updates: don't die when deleting a message we don't have in db, just log and ignore

This commit is contained in:
Adam Van Ymeren
2025-06-27 20:20:53 -07:00
parent 7a04f298d2
commit af630ecbd1
2 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -697,7 +697,11 @@ func (t *TelegramClient) onDeleteMessages(ctx context.Context, channelID int64,
return err
}
if len(parts) == 0 {
return fmt.Errorf("no parts found for message %d", messageID)
zerolog.Ctx(ctx).Debug().
Int("message_id", messageID).
Int64("channel_id", channelID).
Msg("ignoring delete of message we have no parts for")
continue
}
// TODO can deletes happen across rooms?
portalKey = parts[0].Room