aboutsummaryrefslogtreecommitdiff
path: root/telegram/commands.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-07-09 06:52:30 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-07-09 06:52:30 +0300
commit959dc061ff30ba1cf5c699adc0f7d1d991d7afa5 (patch)
treec9c0b6c97ec703ad6fbc2f75b250dd9930f2a653 /telegram/commands.go
parent30b3fd16153fab727315f014150d98b367ccd6ad (diff)
Send carbons for outgoing messages to other resources
Diffstat (limited to 'telegram/commands.go')
-rw-r--r--telegram/commands.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/telegram/commands.go b/telegram/commands.go
index 2f879b1..53b5d75 100644
--- a/telegram/commands.go
+++ b/telegram/commands.go
@@ -513,11 +513,14 @@ func (c *Client) ProcessChatCommand(chatID int64, cmdline string) (string, bool)
content := c.PrepareOutgoingMessageContent(rawCmdArguments(cmdline, 0))
if content != nil {
- c.client.EditMessageText(&client.EditMessageTextRequest{
+ _, err = c.client.EditMessageText(&client.EditMessageTextRequest{
ChatId: chatID,
MessageId: message.Id,
InputMessageContent: content,
})
+ if err != nil {
+ return "Message editing error", true
+ }
} else {
return "Message processing error", true
}
@@ -650,7 +653,7 @@ func (c *Client) ProcessChatCommand(chatID int64, cmdline string) (string, bool)
}
if messages != nil && messages.Messages != nil {
for _, message := range messages.Messages {
- c.ProcessIncomingMessage(targetChatId, message)
+ c.ProcessIncomingMessage(targetChatId, message, "")
}
}
// print vCard