aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-04-19 18:30:59 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-04-19 18:30:59 +0500
commit2d68866021180ac35c77b6022e717bc727280177 (patch)
tree2cf0b1311d2844891585febb09ddef2858ee5e05
parentdaf1f01bda7e8a1ae3b6c6255d0cb31cc5b3b12f (diff)
downloadprosody-2d68866021180ac35c77b6022e717bc727280177.tar.gz
prosody-2d68866021180ac35c77b6022e717bc727280177.zip
MUC: Include <status code='100'/> in a message, not in presence. Fixes various issues.
-rw-r--r--plugins/muc/muc.lib.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 1cc001bb..1081c5ff 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -319,6 +319,11 @@ function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc
:tag("item", {affiliation=affiliation or "none", role=role or "none"}):up()
:tag("status", {code='110'}));
end
+ if self._data.whois == 'anyone' then -- non-anonymous?
+ self:_route_stanza(st.stanza("message", {from=to, to=from, type='groupchat'})
+ :tag("x", {xmlns='http://jabber.org/protocol/muc#user'})
+ :tag("status", {code='100'}));
+ end
self:send_history(from);
else -- banned
local reply = st.error_reply(stanza, "auth", "forbidden"):up();
@@ -799,9 +804,6 @@ function room_mt:_route_stanza(stanza)
end
end
end
- if self._data.whois == 'anyone' then
- muc_child:tag('status', { code = '100' });
- end
end
self:route_stanza(stanza);
if muc_child then