diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2016-06-05 22:04:38 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2016-06-05 22:04:38 +0200 |
commit | 5c3074c0fb28bb04a74cd9f44bf0a8ecc3bd8312 (patch) | |
tree | bb456a6133bb4b824dbb6000822bfdda0e50209b /src/mod_client_state.erl | |
parent | mod_client_state: Simplify handling of PEP stanzas (diff) |
mod_client_state: Fix handling of chat states
Fix the check for chat states sent from other resources of the same
user.
Diffstat (limited to '')
-rw-r--r-- | src/mod_client_state.erl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mod_client_state.erl b/src/mod_client_state.erl index 84f501bb..68a276ca 100644 --- a/src/mod_client_state.erl +++ b/src/mod_client_state.erl @@ -165,11 +165,10 @@ filter_presence(Acc, _Host, _Stanza) -> Acc. filter_chat_states({C2SState, _OutStanzas} = Acc, Host, #xmlel{name = <<"message">>} = Stanza) -> - Payload = jlib:unwrap_carbon(Stanza), - case jlib:is_standalone_chat_state(Payload) of + case jlib:is_standalone_chat_state(jlib:unwrap_carbon(Stanza)) of true -> - From = fxml:get_tag_attr_s(<<"from">>, Payload), - To = fxml:get_tag_attr_s(<<"to">>, Payload), + From = fxml:get_tag_attr_s(<<"from">>, Stanza), + To = fxml:get_tag_attr_s(<<"to">>, Stanza), case {jid:from_string(From), jid:from_string(To)} of {#jid{luser = U, lserver = S}, #jid{luser = U, lserver = S}} -> %% Don't queue (carbon copies of) chat states from other |