Mercurial > prosody-hg
comparison plugins/mod_carbons.lua @ 7698:edacd0bef0e8
mod_carbons: Fix logic presendence
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 17 Oct 2016 23:23:36 +0200 |
| parents | 27f5db07bec9 |
| children | c58075c4d375 |
comparison
equal
deleted
inserted
replaced
| 7696:1c410b4f3a58 | 7698:edacd0bef0e8 |
|---|---|
| 24 local origin, stanza = event.origin, event.stanza; | 24 local origin, stanza = event.origin, event.stanza; |
| 25 local orig_type = stanza.attr.type or "normal"; | 25 local orig_type = stanza.attr.type or "normal"; |
| 26 local orig_from = stanza.attr.from; | 26 local orig_from = stanza.attr.from; |
| 27 local orig_to = stanza.attr.to; | 27 local orig_to = stanza.attr.to; |
| 28 | 28 |
| 29 if not(orig_type == "chat" or orig_type == "normal" and stanza:get_child("body")) then | 29 if not(orig_type == "chat" or (orig_type == "normal" and stanza:get_child("body"))) then |
| 30 return -- Only chat type messages | 30 return -- Only chat type messages |
| 31 end | 31 end |
| 32 | 32 |
| 33 -- Stanza sent by a local client | 33 -- Stanza sent by a local client |
| 34 local bare_jid = jid_bare(orig_from); | 34 local bare_jid = jid_bare(orig_from); |
