mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
*** empty log message ***
SVN Revision: 22
This commit is contained in:
parent
6cf63ab17f
commit
8e2a94b71d
@ -181,10 +181,9 @@ session_established({xmlstreamelement, El}, StateData) ->
|
|||||||
[FromJID, El, StateData]),
|
[FromJID, El, StateData]),
|
||||||
presence_update(FromJID, El, StateData);
|
presence_update(FromJID, El, StateData);
|
||||||
_ ->
|
_ ->
|
||||||
ejabberd_router:route({StateData#state.user,
|
|
||||||
Server, ""},
|
|
||||||
ToJID, El),
|
|
||||||
presence_track(FromJID, ToJID, El, StateData)
|
presence_track(FromJID, ToJID, El, StateData)
|
||||||
|
%ejabberd_router:route(FrJID, ToJID, El),
|
||||||
|
%NewSt
|
||||||
end;
|
end;
|
||||||
_ ->
|
_ ->
|
||||||
ejabberd_router:route(FromJID, ToJID, El),
|
ejabberd_router:route(FromJID, ToJID, El),
|
||||||
@ -490,30 +489,38 @@ presence_track(From, To, Packet, StateData) ->
|
|||||||
User = StateData#state.user,
|
User = StateData#state.user,
|
||||||
case xml:get_attr_s("type", Attrs) of
|
case xml:get_attr_s("type", Attrs) of
|
||||||
"unavailable" ->
|
"unavailable" ->
|
||||||
|
ejabberd_router:route(From, To, Packet),
|
||||||
I = remove_element(LTo, StateData#state.pres_i),
|
I = remove_element(LTo, StateData#state.pres_i),
|
||||||
A = remove_element(LTo, StateData#state.pres_a),
|
A = remove_element(LTo, StateData#state.pres_a),
|
||||||
StateData#state{pres_i = I,
|
StateData#state{pres_i = I,
|
||||||
pres_a = A};
|
pres_a = A};
|
||||||
"invisible" ->
|
"invisible" ->
|
||||||
|
ejabberd_router:route(From, To, Packet),
|
||||||
I = ?SETS:add_element(LTo, StateData#state.pres_i),
|
I = ?SETS:add_element(LTo, StateData#state.pres_i),
|
||||||
A = remove_element(LTo, StateData#state.pres_a),
|
A = remove_element(LTo, StateData#state.pres_a),
|
||||||
StateData#state{pres_i = I,
|
StateData#state{pres_i = I,
|
||||||
pres_a = A};
|
pres_a = A};
|
||||||
"subscribe" ->
|
"subscribe" ->
|
||||||
|
ejabberd_router:route(jlib:jid_remove_resource(From), To, Packet),
|
||||||
mod_roster:out_subscription(User, To, subscribe),
|
mod_roster:out_subscription(User, To, subscribe),
|
||||||
StateData;
|
StateData;
|
||||||
"subscribed" ->
|
"subscribed" ->
|
||||||
|
ejabberd_router:route(jlib:jid_remove_resource(From), To, Packet),
|
||||||
mod_roster:out_subscription(User, To, subscribed),
|
mod_roster:out_subscription(User, To, subscribed),
|
||||||
StateData;
|
StateData;
|
||||||
"unsubscribe" ->
|
"unsubscribe" ->
|
||||||
|
ejabberd_router:route(jlib:jid_remove_resource(From), To, Packet),
|
||||||
mod_roster:out_subscription(User, To, unsubscribe),
|
mod_roster:out_subscription(User, To, unsubscribe),
|
||||||
StateData;
|
StateData;
|
||||||
"unsubscribed" ->
|
"unsubscribed" ->
|
||||||
|
ejabberd_router:route(jlib:jid_remove_resource(From), To, Packet),
|
||||||
mod_roster:out_subscription(User, To, unsubscribed),
|
mod_roster:out_subscription(User, To, unsubscribed),
|
||||||
StateData;
|
StateData;
|
||||||
"error" ->
|
"error" ->
|
||||||
|
ejabberd_router:route(From, To, Packet),
|
||||||
StateData;
|
StateData;
|
||||||
_ ->
|
_ ->
|
||||||
|
ejabberd_router:route(From, To, Packet),
|
||||||
I = remove_element(LTo, StateData#state.pres_i),
|
I = remove_element(LTo, StateData#state.pres_i),
|
||||||
A = ?SETS:add_element(LTo, StateData#state.pres_a),
|
A = ?SETS:add_element(LTo, StateData#state.pres_a),
|
||||||
StateData#state{pres_i = I,
|
StateData#state{pres_i = I,
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
jid_to_string/1,
|
jid_to_string/1,
|
||||||
tolower/1,
|
tolower/1,
|
||||||
jid_tolower/1,
|
jid_tolower/1,
|
||||||
|
jid_remove_resource/1,
|
||||||
get_iq_namespace/1,
|
get_iq_namespace/1,
|
||||||
iq_query_info/1,
|
iq_query_info/1,
|
||||||
is_iq_request_type/1,
|
is_iq_request_type/1,
|
||||||
@ -183,6 +184,9 @@ tolower(S) ->
|
|||||||
jid_tolower({U, S, R}) ->
|
jid_tolower({U, S, R}) ->
|
||||||
{tolower(U), tolower(S), R}.
|
{tolower(U), tolower(S), R}.
|
||||||
|
|
||||||
|
jid_remove_resource({U, S, R}) ->
|
||||||
|
{U, S, ""}.
|
||||||
|
|
||||||
get_iq_namespace({xmlelement, Name, Attrs, Els}) when Name == "iq" ->
|
get_iq_namespace({xmlelement, Name, Attrs, Els}) when Name == "iq" ->
|
||||||
case xml:remove_cdata(Els) of
|
case xml:remove_cdata(Els) of
|
||||||
[{xmlelement, Name2, Attrs2, Els2}] ->
|
[{xmlelement, Name2, Attrs2, Els2}] ->
|
||||||
|
Loading…
Reference in New Issue
Block a user