Diff

plugins/mod_mam/mod_mam.lua @ 10743:3967cf10de1b

mod_mam: Respect no-store hint (thanks Ge0rG) no-store is used in an example in XEP-0313, so obviously this is the preferred hint
author Kim Alvefur <zash@zash.se>
date Wed, 22 Apr 2020 18:47:06 +0200
parent 10742:70b7c8f3d32d
child 10744:16002abe61b1
line wrap: on
line diff
--- a/plugins/mod_mam/mod_mam.lua	Tue Apr 21 23:06:55 2020 +0200
+++ b/plugins/mod_mam/mod_mam.lua	Wed Apr 22 18:47:06 2020 +0200
@@ -278,7 +278,8 @@
 		-- MUC messages always go to the full JID, usually archived by the MUC
 		return false, "groupchat";
 	end
-	if stanza:get_child("no-permanent-store", "urn:xmpp:hints") then
+	if stanza:get_child("no-store", "urn:xmpp:hints")
+	or stanza:get_child("no-permanent-store", "urn:xmpp:hints") then
 		return false, "hint";
 	end
 	if stanza:get_child("store", "urn:xmpp:hints") then