Skip to content

Check the timestamp of the last message before sending notifications #3

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

Open
kafeman opened this issue Dec 25, 2023 · 0 comments
Open
Assignees

Comments

@kafeman
Copy link
Member

kafeman commented Dec 25, 2023

Some users send many chat messages at once and we want to reduce the number of notifications.

Right now, there is a cron script running every 10 minutes which does this. But if the execution time of the script happens exactly in the in the middle of this bunch of messages, the user gets two notifications instead of one.

Instead, the script should check first if the last message was sent, say, more than 5 minutes ago. If it isn't, the sender is probably still spamming the poor recipient :-)

@kafeman kafeman self-assigned this Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant