25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

exmpp fixes in mod_muc (thanks to Karim Gemayel)

SVN Revision: 2931
This commit is contained in:
Badlop 2010-01-27 18:53:38 +00:00
parent 4caac4a322
commit a10493976e
2 changed files with 20 additions and 4 deletions

View File

@ -616,9 +616,23 @@ iq_disco_items(Host, From, Lang, Rsm) ->
{item, Desc} ->
flush(),
{true,
{xmlelement, "item",
[{"jid", jlib:jid_to_string({Name, Host, ""})},
{"name", Desc}], []}};
#xmlel{name = 'item',
attrs = [
#xmlattr{
name = 'jid',
value = jlib:jid_to_string({Name, Host, ""})
},
#xmlattr{
name = 'name',
value = Desc
}
]
}
};
%{xmlelement, "item",
%[{"jid", jlib:jid_to_string({Name, Host, ""})},
%{"name", Desc}], []}};
_ ->
false
end

View File

@ -1691,7 +1691,9 @@ add_new_user(From, Nick, Packet, StateData) ->
case ejabberd_captcha:create_captcha(
ID, SID, RoomJID, To, Lang, From) of
{ok, CaptchaEls} ->
MsgPkt = {xmlelement, "message", [{"id", ID}], CaptchaEls},
MsgPkt = #xmlel{name = 'message',
attrs = [#xmlattr{name = 'id', value = ID}],
children = CaptchaEls},
Robots = ?DICT:store(From,
{Nick, Packet}, StateData#state.robots),
ejabberd_router:route(RoomJID, From, MsgPkt),