diff options
author | Pablo Polvorin <pablo.polvorin@process-one.net> | 2011-01-27 17:05:16 +0300 |
---|---|---|
committer | Pablo Polvorin <pablo.polvorin@process-one.net> | 2011-01-27 17:05:16 +0300 |
commit | 70a2200888e8efdfe915ffa433a17dc3038cfe2d (patch) | |
tree | e446bd77032054b0dea45714db8ef8ecd5b2411a /src/ejabberd_c2s.erl | |
parent | 3391c9cad7c6fa76804501e60e4597d35cfaf59c (diff) |
Fix initial presence after roster subscription approval (EJAB-1384)
Send initial presence after the roster subscription workflow
is complete.
Diffstat (limited to 'src/ejabberd_c2s.erl')
-rw-r--r-- | src/ejabberd_c2s.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 8d2e6e39f..59b886482 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -226,7 +226,7 @@ broadcast(FsmRef, Type, From, Packet) -> get_state(FsmRef) -> ?GEN_FSM:sync_send_all_state_event(FsmRef, get_state, 1000). -add_rosteritem(FsmRef, IJID, ISubscription) -> +add_rosteritem(FsmRef, IJID, ISubscription) when is_binary(ISubscription) -> ?GEN_FSM:send_all_state_event(FsmRef, {add_rosteritem, IJID, ISubscription}). del_rosteritem(FsmRef, IJID) -> @@ -1146,7 +1146,7 @@ handle_event({add_rosteritem, IJID, ISubscription}, StateName, StateData) -> fsm_next_state(StateName, NewStateData); handle_event({del_rosteritem, IJID}, StateName, StateData) -> - NewStateData = roster_change(IJID, none, StateData), + NewStateData = roster_change(IJID, <<"none">>, StateData), fsm_next_state(StateName, NewStateData); handle_event(_Event, StateName, StateData) -> @@ -1956,8 +1956,8 @@ remove_element(E, Set) -> roster_change(IJID, ISubscription, StateData) -> LIJID = jlib:short_prepd_jid(IJID), - IsFrom = (ISubscription == both) or (ISubscription == from), - IsTo = (ISubscription == both) or (ISubscription == to), + IsFrom = (ISubscription == <<"both">>) or (ISubscription == <<"from">>), + IsTo = (ISubscription == <<"both">>) or (ISubscription == <<"to">>), OldIsFrom = ?SETS:is_element(LIJID, StateData#state.pres_f), FSet = if IsFrom -> |