From ff193a1a6f9545326b46f4a09f905eb76afcdc9d Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 13 Jan 2020 00:13:54 +0100 Subject: mod_carboncopy: Also copy mediated MUC invitations --- src/mod_carboncopy.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mod_carboncopy.erl b/src/mod_carboncopy.erl index c704f91c0..b7fe51962 100644 --- a/src/mod_carboncopy.erl +++ b/src/mod_carboncopy.erl @@ -271,7 +271,12 @@ is_chat_message(_) -> is_received_muc_invite(_Packet, sent) -> false; is_received_muc_invite(Packet, received) -> - xmpp:has_subtag(Packet, #x_conference{}). + case xmpp:get_subtag(Packet, #muc_user{}) of + #muc_user{invites = [_|_]} -> + true; + _ -> + xmpp:has_subtag(Packet, #x_conference{}) + end. -spec is_received_muc_pm(jid(), message(), direction()) -> boolean(). is_received_muc_pm(#jid{lresource = <<>>}, _Packet, _Direction) -> -- cgit v1.2.3