Mercurial > prosody-modules
comparison mod_carbons/mod_carbons.lua @ 2338:51beecac93c2
mod_carbons: Fix logic presendence
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 18 Oct 2016 14:59:02 +0200 |
| parents | feebb38c670d |
| children | b41957bf4fd3 |
comparison
equal
deleted
inserted
replaced
| 2337:c6e86b74f62e | 2338:51beecac93c2 |
|---|---|
| 31 local origin, stanza = event.origin, event.stanza; | 31 local origin, stanza = event.origin, event.stanza; |
| 32 local orig_type = stanza.attr.type or "normal"; | 32 local orig_type = stanza.attr.type or "normal"; |
| 33 local orig_from = stanza.attr.from; | 33 local orig_from = stanza.attr.from; |
| 34 local orig_to = stanza.attr.to; | 34 local orig_to = stanza.attr.to; |
| 35 | 35 |
| 36 if not(orig_type == "chat" or orig_type == "normal" and stanza:get_child("body")) then | 36 if not(orig_type == "chat" or (orig_type == "normal" and stanza:get_child("body"))) then |
| 37 return -- Only chat type messages | 37 return -- Only chat type messages |
| 38 end | 38 end |
| 39 | 39 |
| 40 -- Stanza sent by a local client | 40 -- Stanza sent by a local client |
| 41 local bare_jid = jid_bare(orig_from); | 41 local bare_jid = jid_bare(orig_from); |
