aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--telegram/handlers.go19
1 files changed, 10 insertions, 9 deletions
diff --git a/telegram/handlers.go b/telegram/handlers.go
index 64280e6..3c54746 100644
--- a/telegram/handlers.go
+++ b/telegram/handlers.go
@@ -304,20 +304,21 @@ func (c *Client) updateMessageContent(update *client.UpdateMessageContent) {
}
if ok && lastXmppId == xmppId {
replaceId = xmppId
- message, err := c.client.GetMessage(&client.GetMessageRequest{
- ChatId: update.ChatId,
- MessageId: update.MessageId,
- })
- if err == nil {
- isCarbon = c.isCarbonsEnabled() && message.IsOutgoing
- } else {
- log.Errorf("No message %v/%v found, cannot reliably determine if it's a carbon", update.ChatId, update.MessageId)
- }
} else {
log.Infof("Mismatching message ids: %v %v, falling back to separate edit message", lastXmppId, xmppId)
}
}
+ message, err := c.client.GetMessage(&client.GetMessageRequest{
+ ChatId: update.ChatId,
+ MessageId: update.MessageId,
+ })
+ if err == nil {
+ isCarbon = c.isCarbonsEnabled() && message.IsOutgoing
+ } else {
+ log.Errorf("No message %v/%v found, cannot reliably determine if it's a carbon", update.ChatId, update.MessageId)
+ }
+
text := formatter.Format(
textContent.Text.Text,
textContent.Text.Entities,