From 2d68866021180ac35c77b6022e717bc727280177 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Mon, 19 Apr 2010 18:30:59 +0500 Subject: MUC: Include in a message, not in presence. Fixes various issues. --- plugins/muc/muc.lib.lua | 8 +++++--- 1 file 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 -- cgit v1.2.3