mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Several fixes about binary in mod_muc
This commit is contained in:
parent
493d3bc7aa
commit
98a78b7955
@ -439,9 +439,7 @@ do_route1(Host, ServerHost, Access, HistorySize, RoomShaper,
|
|||||||
exmpp_iq:iq_to_xmlel(Res));
|
exmpp_iq:iq_to_xmlel(Res));
|
||||||
#iq{} = IQ ->
|
#iq{} = IQ ->
|
||||||
Err = exmpp_iq:error(IQ,'feature-not-implemented'),
|
Err = exmpp_iq:error(IQ,'feature-not-implemented'),
|
||||||
ejabberd_router:route(To, From, Err);
|
ejabberd_router:route(To, From, Err)
|
||||||
_ ->
|
|
||||||
ok
|
|
||||||
end;
|
end;
|
||||||
'message' ->
|
'message' ->
|
||||||
case exmpp_xml:get_attribute_as_list(Packet,type, "chat") of
|
case exmpp_xml:get_attribute_as_list(Packet,type, "chat") of
|
||||||
@ -762,13 +760,13 @@ iq_get_register_info(Host, From, Lang) ->
|
|||||||
Registered ++
|
Registered ++
|
||||||
[#xmlel{name = 'instructions' ,
|
[#xmlel{name = 'instructions' ,
|
||||||
children = [#xmlcdata{cdata =
|
children = [#xmlcdata{cdata =
|
||||||
translate:translate(Lang,
|
list_to_binary(translate:translate(Lang,
|
||||||
"You need an x:data capable client to register nickname")}]},
|
"You need an x:data capable client to register nickname"))}]},
|
||||||
#xmlel{ns = ?NS_DATA_FORMS, name = 'x',
|
#xmlel{ns = ?NS_DATA_FORMS, name = 'x',
|
||||||
children = [
|
children = [
|
||||||
#xmlel{ns = ?NS_DATA_FORMS, name = 'title',
|
#xmlel{ns = ?NS_DATA_FORMS, name = 'title',
|
||||||
children = [#xmlcdata{cdata =
|
children = [#xmlcdata{cdata =
|
||||||
[translate:translate(Lang, "Nickname Registration at "), Host]}]},
|
list_to_binary(translate:translate(Lang, "Nickname Registration at ") ++ Host)}]},
|
||||||
#xmlel{ns = ?NS_DATA_FORMS, name = 'instructions',
|
#xmlel{ns = ?NS_DATA_FORMS, name = 'instructions',
|
||||||
children = [#xmlcdata{cdata =
|
children = [#xmlcdata{cdata =
|
||||||
translate:translate(Lang, "Enter nickname you want to register")}]},
|
translate:translate(Lang, "Enter nickname you want to register")}]},
|
||||||
@ -865,15 +863,15 @@ iq_get_vcard(Lang) ->
|
|||||||
[#xmlel{ns = ?NS_VCARD, name = 'FN',
|
[#xmlel{ns = ?NS_VCARD, name = 'FN',
|
||||||
children = [#xmlcdata{cdata = <<"ejabberd/mod_muc">>}]},
|
children = [#xmlcdata{cdata = <<"ejabberd/mod_muc">>}]},
|
||||||
#xmlel{ns = ?NS_VCARD, name = 'URL',
|
#xmlel{ns = ?NS_VCARD, name = 'URL',
|
||||||
children = [#xmlcdata{cdata = ?EJABBERD_URI}]},
|
children = [#xmlcdata{cdata = list_to_binary(?EJABBERD_URI)}]},
|
||||||
#xmlel{ns = ?NS_VCARD, name = 'DESC',
|
#xmlel{ns = ?NS_VCARD, name = 'DESC',
|
||||||
children = [#xmlcdata{cdata =
|
children = [#xmlcdata{cdata =
|
||||||
translate:translate(Lang, "ejabberd MUC module") ++
|
list_to_binary(translate:translate(Lang, "ejabberd MUC module") ++
|
||||||
"\nCopyright (c) 2003-2010 Alexey Shchepin"}]}]}.
|
"\nCopyright (c) 2003-2010 Alexey Shchepin")}]}]}.
|
||||||
|
|
||||||
iq_get_unique_el(From) ->
|
iq_get_unique_el(From) ->
|
||||||
#xmlel{ns = ?NS_MUC_UNIQUE, name = 'unique',
|
#xmlel{ns = ?NS_MUC_UNIQUE, name = 'unique',
|
||||||
children = [#xmlcdata{cdata = iq_get_unique_name(From)}]}.
|
children = [#xmlcdata{cdata = list_to_binary(iq_get_unique_name(From))}]}.
|
||||||
|
|
||||||
%% @doc Get a pseudo unique Room Name. The Room Name is generated as a hash of
|
%% @doc Get a pseudo unique Room Name. The Room Name is generated as a hash of
|
||||||
%% the requester JID, the local time and a random salt.
|
%% the requester JID, the local time and a random salt.
|
||||||
|
Loading…
Reference in New Issue
Block a user