diff options
author | Kim Alvefur <zash@zash.se> | 2020-04-26 20:24:51 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-04-26 20:24:51 +0200 |
commit | dfbdd09b1ec53446aedc4c4e4e5d096bc6a0181c (patch) | |
tree | 399b94f98f0a81685c6d9fb85f4992077e25faea /plugins | |
parent | 5694b402f2109b2cec6a40195467e77de7e51536 (diff) | |
download | prosody-dfbdd09b1ec53446aedc4c4e4e5d096bc6a0181c.tar.gz prosody-dfbdd09b1ec53446aedc4c4e4e5d096bc6a0181c.zip |
mod_carbons: Carbon anything that has been archived by the current user
This ensures rules in mod_mam apply to some extent. Messages worth
archiving are probably worth sending to other clients.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_carbons.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_carbons.lua b/plugins/mod_carbons.lua index 9befc9cb..c5efce39 100644 --- a/plugins/mod_carbons.lua +++ b/plugins/mod_carbons.lua @@ -47,6 +47,12 @@ local function should_copy(stanza, c2s, user_bare) return true, "bounce"; end + for archived in stanza:childtags("stanza-id", "urn:xmpp:sid:0") do + if archived and archived.attr.by == user_bare then + return true, "archived"; + end + end + return false, "default"; end |