diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-08-02 03:03:34 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-08-02 03:03:34 +0300 |
commit | 8fc9edd7e70aeca266ab2860198de49bdc2ab585 (patch) | |
tree | 4e1753574f9e04846cc5c7894a27c8b617fae90a | |
parent | a5f6c600357d4000b4a904e36cac1256ca3ac01d (diff) |
Prevent messages to a certain resource from being carbon-copiedv1.7.2
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | telegabber.go | 2 | ||||
-rw-r--r-- | xmpp/gateway/gateway.go | 3 |
3 files changed, 5 insertions, 2 deletions
@@ -2,7 +2,7 @@ COMMIT := $(shell git rev-parse --short HEAD) TD_COMMIT := "8517026415e75a8eec567774072cbbbbb52376c1" -VERSION := "v1.7.1" +VERSION := "v1.7.2" MAKEOPTS := "-j4" all: diff --git a/telegabber.go b/telegabber.go index cfeecda..9ce070f 100644 --- a/telegabber.go +++ b/telegabber.go @@ -15,7 +15,7 @@ import ( goxmpp "gosrc.io/xmpp" ) -var version string = "1.7.1" +var version string = "1.7.2" var commit string var sm *goxmpp.StreamManager 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{ |