Software /
code /
prosody
Comparison
plugins/mod_mam/mod_mam.lua @ 11760:d66738eeb875
mod_mam: Suppress offline message broadcast for MAM clients
MattJ on 09:34:24
> Zash: I think as a first step, offline messages should not be sent to
> clients that request MAM
https://chat.modernxmpp.org/log/modernxmpp/2021-08-31#2021-08-31-8518a542bd283686
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 31 Aug 2021 11:38:09 +0200 |
parent | 11759:9925be5d3b8b |
child | 11795:41af102c7190 |
comparison
equal
deleted
inserted
replaced
11759:9925be5d3b8b | 11760:d66738eeb875 |
---|---|
486 return true; | 486 return true; |
487 end | 487 end |
488 end | 488 end |
489 end, -2); | 489 end, -2); |
490 | 490 |
491 -- Don't broadcast offline messages to clients that have queried the archive. | |
492 module:hook("message/offline/broadcast", function (event) | |
493 if event.origin.mam_requested then | |
494 return true; | |
495 end | |
496 end); | |
497 | |
491 if cleanup_after ~= "never" then | 498 if cleanup_after ~= "never" then |
492 local cleanup_storage = module:open_store("archive_cleanup"); | 499 local cleanup_storage = module:open_store("archive_cleanup"); |
493 local cleanup_map = module:open_store("archive_cleanup", "map"); | 500 local cleanup_map = module:open_store("archive_cleanup", "map"); |
494 | 501 |
495 local day = 86400; | 502 local day = 86400; |