25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Remove support for the rejected XEP-0018 Invisible Presence (EJAB-810)

This commit is contained in:
Badlop 2010-06-17 22:43:15 +02:00
parent 3bcc60066e
commit b6711e407e

View File

@ -1142,10 +1142,6 @@ handle_info({route, From, To, Packet}, StateName, StateData) ->
NewA = remove_element(LFrom, NewA = remove_element(LFrom,
StateData#state.pres_a), StateData#state.pres_a),
{true, Attrs, StateData#state{pres_a = NewA}}; {true, Attrs, StateData#state{pres_a = NewA}};
'invisible' ->
Attrs1 = exmpp_stanza:set_type_in_attrs(Attrs,
'unavailable'),
{true, Attrs1, StateData};
'subscribe' -> 'subscribe' ->
SRes = is_privacy_allow(From, To, Packet, StateData#state.privacy_list), SRes = is_privacy_allow(From, To, Packet, StateData#state.privacy_list),
{SRes, Attrs, StateData}; {SRes, Attrs, StateData};
@ -1653,32 +1649,6 @@ presence_update(From, Packet, StateData) ->
pres_a = ?SETS:new(), pres_a = ?SETS:new(),
pres_i = ?SETS:new(), pres_i = ?SETS:new(),
pres_invis = false}; pres_invis = false};
'invisible' ->
NewPriority = try
exmpp_presence:get_priority(Packet)
catch
_Exception -> 0
end,
update_priority(NewPriority, Packet, StateData),
NewState =
if
not StateData#state.pres_invis ->
presence_broadcast(StateData, From,
StateData#state.pres_a,
Packet),
presence_broadcast(StateData, From,
StateData#state.pres_i,
Packet),
S1 = StateData#state{pres_last = undefined,
pres_timestamp = undefined,
pres_a = ?SETS:new(),
pres_i = ?SETS:new(),
pres_invis = true},
presence_broadcast_first(From, S1, Packet);
true ->
StateData
end,
NewState;
'error' -> 'error' ->
StateData; StateData;
'probe' -> 'probe' ->
@ -1758,13 +1728,6 @@ presence_track(From, To, Packet, StateData) ->
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' ->
ejabberd_router:route(From, To, Packet),
check_privacy_route(From, StateData, From, To, Packet),
I = ?SETS:add_element(LTo, StateData#state.pres_i),
A = remove_element(LTo, StateData#state.pres_a),
StateData#state{pres_i = I,
pres_a = A};
'subscribe' -> 'subscribe' ->
ejabberd_hooks:run(roster_out_subscription, ejabberd_hooks:run(roster_out_subscription,
StateData#state.server, StateData#state.server,