Mercurial > prosody-modules
comparison mod_smacks/mod_smacks.lua @ 1597:dc0cf2ba0e1a
mod_smacks: Stanzas don't have a ':' in their name
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 26 Jan 2015 15:32:19 +0100 |
parents | 05fa54404012 |
children | 043d08448d87 |
comparison
equal
deleted
inserted
replaced
1596:b362e6c00fd1 | 1597:dc0cf2ba0e1a |
---|---|
56 event.features:tag("sm", sm3_attr):tag("optional"):up():up(); | 56 event.features:tag("sm", sm3_attr):tag("optional"):up():up(); |
57 end | 57 end |
58 end); | 58 end); |
59 | 59 |
60 local function outgoing_stanza_filter(stanza, session) | 60 local function outgoing_stanza_filter(stanza, session) |
61 local is_stanza = stanza.attr and not stanza.attr.xmlns; | 61 local is_stanza = stanza.attr and not stanza.attr.xmlns and not stanza.name:find":"; |
62 if is_stanza and not stanza._cached then -- Stanza in default stream namespace | 62 if is_stanza and not stanza._cached then -- Stanza in default stream namespace |
63 local queue = session.outgoing_stanza_queue; | 63 local queue = session.outgoing_stanza_queue; |
64 local cached_stanza = st.clone(stanza); | 64 local cached_stanza = st.clone(stanza); |
65 cached_stanza._cached = true; | 65 cached_stanza._cached = true; |
66 | 66 |