I’m working with server-side notifications using the Go runtime, and I noticed that:
NotificationsDeleteId
and NotificationsUpdate
both require a notification_id
- However, the
NotificationSend
function does not return the notification ID that was generated
Use Case:
From the server, I want to send a notification to a specific user but Later if there is any mistake or for some reason, from another server process, I may want to update or delete that same notification — but I have no way to retrieve the notification_id
.
What is the recommended way to:
- Get the
notification_id
after sending?
- Update or delete a previously sent notification from server-side logic?
Hello @surajTLabs,
You’d need to use NotificationsList
to go through a user’s notifications and get the id of the latest or by filtering by content, or some other criteria. We’ll consider returning the id on notificationSend
.
Best.
Thanks! Yes, this approach works well for a limited number of users.
However, consider a case where we have around 5,000 users in-game and notifications have already been sent to all — managing updates or deletions becomes quite challenging.
- How can we efficiently retrieve a complete list of all users?
- When fetching the latest notifications, we should also include filtering logic to ensure only relevant notifications are read, especially to avoid edge cases.
Is there a mechanism similar to NotificationSendAll
that would allow us to update or delete previously sent notifications?
and yes it will need notification id for sure!