diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-03-19 00:43:11 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-03-19 00:43:11 +0300 |
commit | 42ed16bf9e9d72bf226045f1f291b9d58e2a6200 (patch) | |
tree | e01b63ea0f49afdab1e8463cd1b10138f5db7816 /telegram/commands.go | |
parent | 90807b2d9e0565629a913d3b28b09c5fc9d746e6 (diff) |
Simulate carbons
Diffstat (limited to 'telegram/commands.go')
-rw-r--r-- | telegram/commands.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/telegram/commands.go b/telegram/commands.go index 160e486..368a461 100644 --- a/telegram/commands.go +++ b/telegram/commands.go @@ -193,6 +193,7 @@ func (c *Client) sendMessagesReverse(chatID int64, messages []*client.Message) { strconv.FormatInt(message.Id, 10), c.xmpp, reply, + false, ) } } @@ -361,6 +362,10 @@ func (c *Client) ProcessTransportCommand(cmdline string, resource string) string } case "config": if len(args) > 1 { + if !gateway.MessageOutgoingPermission && args[0] == "carbons" && args[1] == "true" { + return "The server did not allow to enable carbons" + } + value, err := c.Session.Set(args[0], args[1]) if err != nil { return err.Error() |