You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a feature where users can set custom reminders (e.g., "Remind me to do something in 1 hour"), and the system should send a notification to the client at the specified time.
The text was updated successfully, but these errors were encountered:
users can set custom reminders (e.g., "Remind me to do something in 1 hour")
If you want the client to be able to CRUD the custom settings, you can use custom-settings. In simple words, you can support custom settings (e.g. Reminder) by just modifying the server properties and without changing the source code.
By the way, you don't have to CRUD the custom settings via turms servers; you can implement this feature on your own application server too if you want.
the system should send a notification to the client at the specified time
There are two ways to support this feature.
(Recommended) Your client can read the custom setting to know whether the reminder is enabled. If enabled, your client can query some data from servers according to your business requirements.
btw, we do have a plan to support querying all kinds of notifications from servers (e.g. friend requests created/deleted/updated notifications), but the feature will come months later.
Implement your plugin
For details, please read custom plugins.
In this way, you can do anything you want without modifying the source code of Turms servers.
e.g.
Implement your own im.turms.gateway.infra.plugin.extension.UserOnlineStatusChangeHandler
Set up a change stream to the collection user_setting to detect if the reminder setting is enabled. And start a periodic timer to query the last notification time from Redis. If the time difference is larger than 1 hour, send a notification to the online users.
I am working on a feature where users can set custom reminders (e.g., "Remind me to do something in 1 hour"), and the system should send a notification to the client at the specified time.
The text was updated successfully, but these errors were encountered: