Changeset

10739:50f0a4d83731

mod_mam: Store XEP-0184 receipts and requests Happy now Ge0rG?
author Kim Alvefur <zash@zash.se>
date Tue, 21 Apr 2020 01:18:54 +0200
parents 10738:19ffb2ebf114
children 10740:08efb60faf67
files plugins/mod_mam/mod_mam.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_mam/mod_mam.lua	Tue Apr 21 01:17:55 2020 +0200
+++ b/plugins/mod_mam/mod_mam.lua	Tue Apr 21 01:18:54 2020 +0200
@@ -292,6 +292,11 @@
 		-- Since we can't know what an encrypted message contains, we assume it's important
 		return true, "encrypted";
 	end
+	if stanza:get_child(nil, "urn:xmpp:receipts") then
+		-- If it's important enough to ask for a receipt then it's important enough to archive
+		-- and the same applies to the receipt
+		return true, "receipt";
+	end
 	if stanza:get_child("x", "jabber:x:conference")
 	or stanza:find("{http://jabber.org/protocol/muc#user}x/invite") then
 		return true, "invite";