aboutsummaryrefslogtreecommitdiff
path: root/xmpp/gateway
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-08-02 03:03:34 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-08-02 03:03:34 +0300
commit8fc9edd7e70aeca266ab2860198de49bdc2ab585 (patch)
tree4e1753574f9e04846cc5c7894a27c8b617fae90a /xmpp/gateway
parenta5f6c600357d4000b4a904e36cac1256ca3ac01d (diff)
Prevent messages to a certain resource from being carbon-copiedv1.7.2
Diffstat (limited to 'xmpp/gateway')
-rw-r--r--xmpp/gateway/gateway.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmpp/gateway/gateway.go b/xmpp/gateway/gateway.go
index 7e54ee5..1be2fca 100644
--- a/xmpp/gateway/gateway.go
+++ b/xmpp/gateway/gateway.go
@@ -119,6 +119,9 @@ func sendMessageWrapper(to string, from string, body string, id string, componen
message.Extensions = append(message.Extensions, extensions.NewReplyFallback(reply.Start, reply.End))
}
}
+ if !isCarbon && toJid.Resource != "" {
+ message.Extensions = append(message.Extensions, stanza.HintNoCopy{})
+ }
if isCarbon {
carbonMessage := extensions.ClientMessage{