Software /
code /
prosody
Comparison
plugins/mod_carbons.lua @ 11796:71c20650a0b4
mod_carbons: Reduce line count using new util.stanza attr method
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 12 Sep 2021 20:18:04 +0200 |
parent | 11260:08b397c21805 |
child | 11836:8ccb22c0fa56 |
comparison
equal
deleted
inserted
replaced
11795:41af102c7190 | 11796:71c20650a0b4 |
---|---|
58 if stanza:get_child(nil, "urn:xmpp:jingle-message:0") then | 58 if stanza:get_child(nil, "urn:xmpp:jingle-message:0") then |
59 -- XXX Experimental XEP | 59 -- XXX Experimental XEP |
60 return true, "jingle call"; | 60 return true, "jingle call"; |
61 end | 61 end |
62 | 62 |
63 for archived in stanza:childtags("stanza-id", "urn:xmpp:sid:0") do | 63 if stanza:get_child_with_attr("stanza-id", "urn:xmpp:sid:0", "by", user_bare) then |
64 if archived and archived.attr.by == user_bare then | 64 return true, "archived"; |
65 return true, "archived"; | |
66 end | |
67 end | 65 end |
68 | 66 |
69 return false, "default"; | 67 return false, "default"; |
70 end | 68 end |
71 | 69 |