mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Fix some calls to exmpp
SVN Revision: 2138
This commit is contained in:
parent
ff3fd02115
commit
332de67fe2
@ -333,7 +333,7 @@ wait_for_stream({xmlstreamstart, #xmlel{ns = NS} = Opening}, StateData) ->
|
||||
send_element(StateData,
|
||||
exmpp_xml:append_child(Header,
|
||||
exmpp_stream:error('policy-violation',
|
||||
"en", "Use of STARTTLS required"))),
|
||||
{"en", "Use of STARTTLS required"}))),
|
||||
{stop, normal, StateData};
|
||||
true ->
|
||||
send_element(StateData, Header),
|
||||
@ -598,7 +598,7 @@ wait_for_feature_request({xmlstreamelement, #xmlel{ns = NS, name = Name} = El},
|
||||
if
|
||||
(SockMod == gen_tcp) and TLSRequired ->
|
||||
send_element(StateData, exmpp_stream:error(
|
||||
'policy-violation', "en", "Use of STARTTLS required")),
|
||||
'policy-violation', {"en", "Use of STARTTLS required"})),
|
||||
send_element(StateData, exmpp_stream:closing()),
|
||||
{stop, normal, StateData};
|
||||
true ->
|
||||
|
@ -2213,7 +2213,7 @@ process_admin_items_set(UJID, Items, Lang, StateData) ->
|
||||
SD;
|
||||
%% TODO: <<>> or 'undefined' ?
|
||||
%% TODO: double case on the E var, because
|
||||
%% exmpp_jid:lnode/1 can't be used in guards
|
||||
%% exmpp_jid:prep_node/1 can't be used in guards
|
||||
%% If the provided JID does not have username,
|
||||
%% forget the affiliation completely
|
||||
_ -> case E of
|
||||
|
@ -433,7 +433,7 @@ send_loop(State) ->
|
||||
ServerHost -> %% local contacts
|
||||
case ejabberd_sm:get_user_resources(U, S) of
|
||||
[] -> %% offline
|
||||
PeerJID = exmpp_jlib:make_jid(U, S, R),
|
||||
PeerJID = exmpp_jid:make(U, S, R),
|
||||
self() ! {presence, User, Server, [Resource], PeerJID};
|
||||
_ -> %% online
|
||||
% this is already handled by presence probe
|
||||
|
Loading…
Reference in New Issue
Block a user