diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a9507a7b..8adbcdb6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,8 @@ repos: - "go.mau.fi/mautrix-telegram" - "-w" - id: go-vet-mod - - id: go-staticcheck-repo-mod +# Disabled for now until we can find a way to filter out the gotd package +# - id: go-staticcheck-repo-mod - id: go-mod-tidy - repo: https://github.com/beeper/pre-commit-go diff --git a/pkg/connector/telegram.go b/pkg/connector/telegram.go index 9ed7b1c4..598e1abd 100644 --- a/pkg/connector/telegram.go +++ b/pkg/connector/telegram.go @@ -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