Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Polvorin <pablo.polvorin@process-one.net>2011-01-27 17:05:16 +0300
committerPablo Polvorin <pablo.polvorin@process-one.net>2011-01-27 17:05:16 +0300
commit70a2200888e8efdfe915ffa433a17dc3038cfe2d (patch)
treee446bd77032054b0dea45714db8ef8ecd5b2411a /src/ejabberd_c2s.erl
parent3391c9cad7c6fa76804501e60e4597d35cfaf59c (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.erl8
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 ->