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} -> {item, Desc} ->
flush(), flush(),
{true, {true,
{xmlelement, "item", #xmlel{name = 'item',
[{"jid", jlib:jid_to_string({Name, Host, ""})}, attrs = [
{"name", Desc}], []}}; #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 false
end end

View File

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