Mercurial > prosody-modules
comparison mod_muc_limits/mod_muc_limits.lua @ 1205:7d2d440e2fa5
mod_muc_limits: Just drop error stanzas instead of bouncing them with more error stanzas
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 06 Oct 2013 17:30:21 +0200 |
parents | 1255de347dd4 |
children | 091ee76745e8 |
comparison
equal
deleted
inserted
replaced
1204:fc42f8484451 | 1205:7d2d440e2fa5 |
---|---|
57 elseif not dropped_jids[from_jid] then | 57 elseif not dropped_jids[from_jid] then |
58 dropped_jids[from_jid] = true; | 58 dropped_jids[from_jid] = true; |
59 t_insert(dropped_jids, from_jid); | 59 t_insert(dropped_jids, from_jid); |
60 end | 60 end |
61 dropped_count = dropped_count + 1; | 61 dropped_count = dropped_count + 1; |
62 if stanza.attr.type == "error" then -- We don't want to bounce errors | |
63 return true; | |
64 end | |
62 local reply = st.error_reply(stanza, "wait", "policy-violation", "The room is currently overactive, please try again later"); | 65 local reply = st.error_reply(stanza, "wait", "policy-violation", "The room is currently overactive, please try again later"); |
63 local body = stanza:get_child_text("body"); | 66 local body = stanza:get_child_text("body"); |
64 if body then | 67 if body then |
65 reply:up():tag("body"):text(body):up(); | 68 reply:up():tag("body"):text(body):up(); |
66 end | 69 end |