diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2018-06-13 00:25:14 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2018-06-13 00:25:14 +0200 |
commit | 0a20e456900f49fe864293572e458c89d491e9bd (patch) | |
tree | 65b6a0f5b0924b05dcf979638fbbc9b1fea03e2e /src/mod_push.erl | |
parent | mod_push: Also include sender/body for carbons (diff) |
mod_push: Further improve handling of carbons
Also check for carbon-copied messages (with a body) in the queue of
unacknowledged stanzas.
Diffstat (limited to 'src/mod_push.erl')
-rw-r--r-- | src/mod_push.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mod_push.erl b/src/mod_push.erl index eb06e41b..db479cfc 100644 --- a/src/mod_push.erl +++ b/src/mod_push.erl @@ -389,7 +389,7 @@ c2s_session_pending(#{push_enabled := true, mgmt_queue := Queue} = State) -> Len when Len > 0 -> ?DEBUG("Notifying client of unacknowledged stanza(s)", []), Pkt = mod_stream_mgmt:queue_find(fun is_message_with_body/1, Queue), - notify(State, Pkt), + notify(State, xmpp_util:unwrap_carbon(Pkt)), State; 0 -> State @@ -467,7 +467,8 @@ notify(LServer, PushLJID, Node, XData, Pkt, HandleResponse) -> %%-------------------------------------------------------------------- -spec is_message_with_body(stanza()) -> boolean(). is_message_with_body(#message{} = Msg) -> - get_body_text(Msg) /= none; + Msg1 = xmpp_util:unwrap_carbon(Msg), + get_body_text(Msg1) /= none; is_message_with_body(_Stanza) -> false. |