RE: Blurb Blurb - 29-Jan-2025

You are viewing a single comment's thread from:

Blurb Blurb - 29-Jan-2025

in blurt •  15 days ago 

If you want to use the Nexus Notification system you can take a look here: https://dblurt.beblurt.com/classes/nexus.html

methods:

  • client.nexus.unreadNotifications to get the number of unread notifications
  • client.nexus.accountNotifications to get the unread notifications with pagination

To mark notifications as read you need to broadcast a custom_json operation

        /** Prepare data */
        const data: CustomJsonOperation['1'] = {
          id: 'notify',
          json: JSON.stringify(['setLastRead', { date: dayjs().utc().format('YYYY-MM-DDTHH:mm:ss')}]),
          required_auths: [],
          required_posting_auths: [this.userConnected],
        };
        const ops: Operation[] = [['custom_json', data]];
        await this.user.broadcast(ops);

Else you can use the notifications system of blurt.blog, in this case I invite you to ask @saboin

For the suggestion I think something about the more active Blurb user or most trending Blurbs but I don't know an easy way to do it

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!
Sort Order:  

Thank you so much @nalexadre
This one really helps. We are indeed using dBlurt.
I'll pass this piece of information to my dev & let's see how it goes.
gif-1


Reply sent using [Blurt Comments](https://comments.blurt.blog)