diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-08-02 23:41:18 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-08-02 23:41:18 +0300 |
commit | 608f67551297a14e2e23603413bbce66f6ad5cd9 (patch) | |
tree | d89aca9f73cf9de1da86d527dc4d7055716469df /telegram/utils.go | |
parent | 8fc9edd7e70aeca266ab2860198de49bdc2ab585 (diff) |
Revert sending carbons for outgoing messages to other resources (they duplicate what clients already send to each other)v1.7.3
Diffstat (limited to 'telegram/utils.go')
-rw-r--r-- | telegram/utils.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/telegram/utils.go b/telegram/utils.go index cd25c22..62ce945 100644 --- a/telegram/utils.go +++ b/telegram/utils.go @@ -911,7 +911,7 @@ func (c *Client) ensureDownloadFile(file *client.File) *client.File { } // ProcessIncomingMessage transfers a message to XMPP side and marks it as read on Telegram side -func (c *Client) ProcessIncomingMessage(chatId int64, message *client.Message, ignoredResource string) { +func (c *Client) ProcessIncomingMessage(chatId int64, message *client.Message) { var isPM bool var err error if gateway.MessageOutgoingPermission && c.Session.Carbons { @@ -921,13 +921,8 @@ func (c *Client) ProcessIncomingMessage(chatId int64, message *client.Message, i } } - isOutgoing := message.IsOutgoing - isCarbon := isPM && isOutgoing - jids := c.getCarbonFullJids(isOutgoing, ignoredResource) - if len(jids) == 0 { - log.Info("The only resource is ignored, aborting") - return - } + isCarbon := isPM && message.IsOutgoing + jids := c.getCarbonFullJids(isCarbon, "") var text, oob, auxText string |