Comparison

plugins/mod_mam/mod_mam.lua @ 7843:04b09fd144eb

mod_mam: Alter hints processing
author Kim Alvefur <zash@zash.se>
date Sat, 19 Nov 2016 18:27:28 +0100
parent 7842:9332b43931f5
child 7844:316f5166eedb
comparison
equal deleted inserted replaced
7842:9332b43931f5 7843:04b09fd144eb
238 log("debug", "Not archiving stanza: %s (type)", stanza:top_tag()); 238 log("debug", "Not archiving stanza: %s (type)", stanza:top_tag());
239 return; 239 return;
240 end 240 end
241 241
242 -- or if hints suggest we shouldn't 242 -- or if hints suggest we shouldn't
243 if stanza:get_child("no-permanent-storage", "urn:xmpp:hints") -- The XEP needs to decide on "store" or "storage" 243 if not stanza:get_child("store", "urn:xmpp:hints") then -- No hint telling us we should store
244 or stanza:get_child("no-permanent-store", "urn:xmpp:hints") 244 if stanza:get_child("no-permanent-store", "urn:xmpp:hints")
245 or stanza:get_child("no-storage", "urn:xmpp:hints") 245 or stanza:get_child("no-store", "urn:xmpp:hints") then -- Hint telling us we should NOT store
246 or stanza:get_child("no-store", "urn:xmpp:hints") then 246 log("debug", "Not archiving stanza: %s (hint)", stanza:top_tag());
247 log("debug", "Not archiving stanza: %s (hint)", stanza:top_tag()); 247 return;
248 return; 248 end
249 end 249 end
250 250
251 -- Whos storage do we put it in? 251 -- Whos storage do we put it in?
252 local store_user = c2s and origin.username or jid_split(orig_to); 252 local store_user = c2s and origin.username or jid_split(orig_to);
253 -- And who are they chatting with? 253 -- And who are they chatting with?