setNotificationsReadTime
Update the latest view timestamp for notifications.
Form of the timestamp is Unix (seconds).
How to use?
const res = await orbis.setNotificationsReadTime(options);
Parameters
options
- object with the parameters used to retrieve notificationstype
-string
type of notifications to retrievesocial
- mentions, likes, replies, etcmessages
- unread messages
context
-string
The context for which you want to view notificationstimestamp
-int
Should be set to the current timestamp. Unix timestamp is required (seconds)
Returns
{
status: 200,
doc: 'k...',
result: 'Success creating TileDocument.'
}
Examples
Update notification read time
/** Get the current timestamp */
const currentTimestamp = Date.now()
/** Convert the timestamp to seconds as Javascript uses miliseconds */
const unixTimestamp = Math.floor(currentTimestamp / 1000)
const res = await orbis.setNotificationsReadTime({
type: "social",
timestamp: unixTimestamp
});