Mercurial > prosody-modules
comparison mod_carbons/mod_carbons.lua @ 1794:eefe4b69b5f6
mod_carbons: Stanza, not standard, silly autocomplete (Thanks mt)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 27 Aug 2015 12:16:39 +0200 |
| parents | dbce8a7726ef |
| children | 91c01ef82807 |
comparison
equal
deleted
inserted
replaced
| 1793:152439ca92ee | 1794:eefe4b69b5f6 |
|---|---|
| 30 local origin, stanza = event.origin, event.stanza; | 30 local origin, stanza = event.origin, event.stanza; |
| 31 local orig_type = stanza.attr.type or "normal"; | 31 local orig_type = stanza.attr.type or "normal"; |
| 32 local orig_from = stanza.attr.from; | 32 local orig_from = stanza.attr.from; |
| 33 local orig_to = stanza.attr.to; | 33 local orig_to = stanza.attr.to; |
| 34 | 34 |
| 35 if not(orig_type == "chat" or orig_type == "normal" and standard:get_child("body")) then | 35 if not(orig_type == "chat" or orig_type == "normal" and stanza:get_child("body")) then |
| 36 return -- Only chat type messages | 36 return -- Only chat type messages |
| 37 end | 37 end |
| 38 | 38 |
| 39 -- Stanza sent by a local client | 39 -- Stanza sent by a local client |
| 40 local bare_jid = jid_bare(orig_from); | 40 local bare_jid = jid_bare(orig_from); |
