Software /
code /
prosody
Comparison
plugins/mod_mam/mod_mam.lua @ 10738:19ffb2ebf114
mod_mam: Add more positive hints for storage
Mostly just lifted from mod_csi_simple
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 21 Apr 2020 01:17:55 +0200 |
parent | 10737:b2ede421adeb |
child | 10739:50f0a4d83731 |
comparison
equal
deleted
inserted
replaced
10737:b2ede421adeb | 10738:19ffb2ebf114 |
---|---|
281 if stanza:get_child("store", "urn:xmpp:hints") then | 281 if stanza:get_child("store", "urn:xmpp:hints") then |
282 return true, "hint"; | 282 return true, "hint"; |
283 end | 283 end |
284 if stanza:get_child("body") then | 284 if stanza:get_child("body") then |
285 return true, "body"; | 285 return true, "body"; |
286 end | |
287 if stanza:get_child("subject") then | |
288 -- XXX Who would send a message with a subject but with a body? | |
289 return true, "subject"; | |
290 end | |
291 if stanza:get_child("encryption", "urn:xmpp:eme:0") then | |
292 -- Since we can't know what an encrypted message contains, we assume it's important | |
293 return true, "encrypted"; | |
294 end | |
295 if stanza:get_child("x", "jabber:x:conference") | |
296 or stanza:find("{http://jabber.org/protocol/muc#user}x/invite") then | |
297 return true, "invite"; | |
286 end | 298 end |
287 | 299 |
288 return true, "default"; | 300 return true, "default"; |
289 end | 301 end |
290 | 302 |