Software /
code /
prosody
Changeset
10782:6b776f80b96e
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 26 Apr 2020 20:24:51 +0200 |
parents | 10781:f7e8d299513f |
children | 10784:0b0fe73199d2 |
files | plugins/mod_carbons.lua |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_carbons.lua Sun Apr 26 20:23:50 2020 +0200 +++ b/plugins/mod_carbons.lua Sun Apr 26 20:24:51 2020 +0200 @@ -47,6 +47,12 @@ 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