Software / code / prosody
Comparison
plugins/muc/muc.lib.lua @ 1998:40792c18a8e4
MUC: Ignore invisible presence (incorrectly broadcasted or forwarded by ejabberd).
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Sun, 18 Oct 2009 05:54:14 +0500 |
| parent | 1997:c70ee886e309 |
| child | 1999:05054e360d89 |
comparison
equal
deleted
inserted
replaced
| 1997:c70ee886e309 | 1998:40792c18a8e4 |
|---|---|
| 323 origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); | 323 origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); |
| 324 end | 324 end |
| 325 end | 325 end |
| 326 end | 326 end |
| 327 elseif type ~= 'result' then -- bad type | 327 elseif type ~= 'result' then -- bad type |
| 328 origin.send(st.error_reply(stanza, "modify", "bad-request")); -- FIXME correct error? | 328 if type ~= 'visible' and type ~= 'invisible' then -- COMPAT ejabberd can broadcast or forward XEP-0018 presences |
| 329 origin.send(st.error_reply(stanza, "modify", "bad-request")); -- FIXME correct error? | |
| 330 end | |
| 329 end | 331 end |
| 330 elseif not current_nick then -- not in room | 332 elseif not current_nick then -- not in room |
| 331 if type == "error" or type == "result" then | 333 if type == "error" or type == "result" then |
| 332 local id = stanza.name == "iq" and stanza.attr.id and base64.decode(stanza.attr.id); | 334 local id = stanza.name == "iq" and stanza.attr.id and base64.decode(stanza.attr.id); |
| 333 local _nick, _id, _hash = (id or ""):match("^(.+)%z(.*)%z(.+)$"); | 335 local _nick, _id, _hash = (id or ""):match("^(.+)%z(.*)%z(.+)$"); |