-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(Notifications): Add methods for handling unread notifications #2469
base: refactor-and-feature/notification
Are you sure you want to change the base?
Conversation
this.initialize(); | ||
const subscriptions: Array<ChannelInfo> = await this._pushClient!.notification.subscriptions({ | ||
channel: this._akashaChannelAccount, | ||
}); | ||
if (!subscriptions.length) throw new Error('There is no settings for this channel'); | ||
const channelSubscriptionInfo = subscriptions[0]; | ||
let userSettings: UserSetting[] = []; | ||
let userSettings: unknown[] = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This interface didn't exist in original branch so i used unknown to temporarily fix error
Deploying akasha-core-framework with Cloudflare Pages
|
body: string; | ||
title: string; | ||
}; | ||
secret: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all the props are mandatory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't this be used as a ReturnType from the push sdk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return type they have in declaration file of sdk is any
, so I created an interface for it manually.
@@ -19,6 +36,8 @@ class PushProtocol { | |||
private _pushClient?: PushAPI; | |||
private _notificationsStream?: PushStream; | |||
private _akashaChannelAccount = '0x7Ebe714066149bEef3c2f60cC89eadF50Da23C26'; | |||
private _unreadNotifications: PushOrgNotification[] = []; | |||
public readonly lastestSeenSidKey = 'lastestSeenSidKey'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be prefixed with the current authenticated did
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a method that prepends it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this contains also a typo, shouldn't it be latestSeen..
?
Description
Issues that will be closed
Testing
Checklist