Comparison

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
comparison
equal deleted inserted replaced
10742:70b7c8f3d32d 10743:3967cf10de1b
276 end 276 end
277 if st_type == "groupchat" and st_to_full then 277 if st_type == "groupchat" and st_to_full then
278 -- MUC messages always go to the full JID, usually archived by the MUC 278 -- MUC messages always go to the full JID, usually archived by the MUC
279 return false, "groupchat"; 279 return false, "groupchat";
280 end 280 end
281 if stanza:get_child("no-permanent-store", "urn:xmpp:hints") then 281 if stanza:get_child("no-store", "urn:xmpp:hints")
282 or stanza:get_child("no-permanent-store", "urn:xmpp:hints") then
282 return false, "hint"; 283 return false, "hint";
283 end 284 end
284 if stanza:get_child("store", "urn:xmpp:hints") then 285 if stanza:get_child("store", "urn:xmpp:hints") then
285 return true, "hint"; 286 return true, "hint";
286 end 287 end