summaryrefslogtreecommitdiff
path: root/src/mod_client_state.erl
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2016-08-06 13:36:27 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2016-08-06 13:36:27 +0200
commitb62aa3d2dcf3298f221f01b8ffb02f839aabfb8b (patch)
treec16baae4714613b3cb8331d94ed2d594b24bea3e /src/mod_client_state.erl
parentAdd user's JID to CSI hook arguments (diff)
mod_client_state: Let other modules filter stanzas
Don't stop execution of the 'csi_filter_stanza' hook if mod_client_state won't queue the stanza.
Diffstat (limited to 'src/mod_client_state.erl')
-rw-r--r--src/mod_client_state.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mod_client_state.erl b/src/mod_client_state.erl
index da870f8e..9d37d4f5 100644
--- a/src/mod_client_state.erl
+++ b/src/mod_client_state.erl
@@ -205,7 +205,7 @@ filter_pep({C2SState, _OutStanzas} = Acc, Host, To,
filter_pep(Acc, _Host, _To, _Stanza) -> Acc.
-spec filter_other({term(), [xmlel()]}, binary(), jid(), xmlel())
- -> {stop, {term(), [xmlel()]}}.
+ -> {term(), [xmlel()]}.
filter_other({C2SState, _OutStanzas}, Host, To, Stanza) ->
?DEBUG("Won't add stanza for ~s to CSI queue", [jid:to_string(To)]),
@@ -250,7 +250,7 @@ queue_add(Type, Stanza, Host, C2SState) ->
{stop, {NewState, []}}
end.
--spec queue_take(xmlel(), binary(), term()) -> {stop, {term(), [xmlel()]}}.
+-spec queue_take(xmlel(), binary(), term()) -> {term(), [xmlel()]}.
queue_take(Stanza, Host, C2SState) ->
From = fxml:get_tag_attr_s(<<"from">>, Stanza),
@@ -260,7 +260,7 @@ queue_take(Stanza, Host, C2SState) ->
U == LUser andalso S == LServer
end, get_queue(C2SState)),
NewState = set_queue(Rest, C2SState),
- {stop, {NewState, get_stanzas(Selected, Host) ++ [Stanza]}}.
+ {NewState, get_stanzas(Selected, Host) ++ [Stanza]}.
-spec set_queue(csi_queue(), term()) -> term().