mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +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,
|
send_element(StateData,
|
||||||
exmpp_xml:append_child(Header,
|
exmpp_xml:append_child(Header,
|
||||||
exmpp_stream:error('policy-violation',
|
exmpp_stream:error('policy-violation',
|
||||||
"en", "Use of STARTTLS required"))),
|
{"en", "Use of STARTTLS required"}))),
|
||||||
{stop, normal, StateData};
|
{stop, normal, StateData};
|
||||||
true ->
|
true ->
|
||||||
send_element(StateData, Header),
|
send_element(StateData, Header),
|
||||||
@ -598,7 +598,7 @@ wait_for_feature_request({xmlstreamelement, #xmlel{ns = NS, name = Name} = El},
|
|||||||
if
|
if
|
||||||
(SockMod == gen_tcp) and TLSRequired ->
|
(SockMod == gen_tcp) and TLSRequired ->
|
||||||
send_element(StateData, exmpp_stream:error(
|
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()),
|
send_element(StateData, exmpp_stream:closing()),
|
||||||
{stop, normal, StateData};
|
{stop, normal, StateData};
|
||||||
true ->
|
true ->
|
||||||
|
@ -2213,7 +2213,7 @@ process_admin_items_set(UJID, Items, Lang, StateData) ->
|
|||||||
SD;
|
SD;
|
||||||
%% TODO: <<>> or 'undefined' ?
|
%% TODO: <<>> or 'undefined' ?
|
||||||
%% TODO: double case on the E var, because
|
%% 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,
|
%% If the provided JID does not have username,
|
||||||
%% forget the affiliation completely
|
%% forget the affiliation completely
|
||||||
_ -> case E of
|
_ -> case E of
|
||||||
|
@ -433,7 +433,7 @@ send_loop(State) ->
|
|||||||
ServerHost -> %% local contacts
|
ServerHost -> %% local contacts
|
||||||
case ejabberd_sm:get_user_resources(U, S) of
|
case ejabberd_sm:get_user_resources(U, S) of
|
||||||
[] -> %% offline
|
[] -> %% offline
|
||||||
PeerJID = exmpp_jlib:make_jid(U, S, R),
|
PeerJID = exmpp_jid:make(U, S, R),
|
||||||
self() ! {presence, User, Server, [Resource], PeerJID};
|
self() ! {presence, User, Server, [Resource], PeerJID};
|
||||||
_ -> %% online
|
_ -> %% online
|
||||||
% this is already handled by presence probe
|
% this is already handled by presence probe
|
||||||
|
Loading…
Reference in New Issue
Block a user