Add debounce-mechanism to messages#1630
Conversation
…ly tracks via message-based hash and timestamp if an identical message was recently sent
|
Thank you for your PR. However, I'd rather do a web app debounce, where I don't play a sound when the last message is <1s ago. Also, your map is never cleared, so it'll eventually OOM most likely |
Oh, so you mean on client-side in general just silently accept the message as subscriber and send no notification alert? Frankly, I am not too sure what the author of the original issue exactly needs but I guess that'll do too.
Oops, that is a very good point. I could just check it on every request or hook it into some goroutine, kind of like you print a status-log on the server-instance every X seconds. All of that only if I would still be going for my original server-side way that is. |
Fixes #1550
Default-config-value: time.Duration(0), implying no debounce is used