reactions,telegramfmt: remove unnecessary warning logs

This commit is contained in:
Tulir Asokan
2025-12-16 18:52:43 +02:00
parent 20446d0d7d
commit cd660472d8
2 changed files with 3 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ func (t *TelegramClient) computeReactionsList(ctx context.Context, peer tg.PeerC
reactionsList := msgReactions.RecentReactions
if totalCount > 0 && len(reactionsList) == 0 && !msgReactions.CanSeeList {
// We don't know who reacted in a channel, so we can't bridge it properly either
log.Warn().Msg("Can't see reaction list in channel")
log.Trace().Msg("Can't see reaction list in channel")
return
}

View File

@@ -86,9 +86,10 @@ func Parse(ctx context.Context, message string, entities []tg.MessageEntityClass
switch entity := e.(type) {
case *tg.MessageEntityMention:
username := utf16Message[e.GetOffset()+1 : e.GetOffset()+e.GetLength()].String()
// TODO support channel links (link to room if exists)
userInfo, err := params.GetUserInfoByUsername(ctx, username)
if err != nil {
log.Warn().Err(err).Str("username", username).Msg("Failed to get user info for mention")
log.Debug().Err(err).Str("username", username).Msg("Failed to get user info for mention")
continue // Skip this mention
}
mentions[userInfo.MXID] = struct{}{}