fix: improve text message handling by removing duplicates and empty lines

This commit is contained in:
krau
2025-12-21 13:17:10 +08:00
parent c069d1edc7
commit ad7e01f052
2 changed files with 19 additions and 3 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ func BuildParsedTextEntity(item parser.Item) (string, []tg.MessageEntityClass, e
styling.Plain(i18n.T(i18nk.BotMsgParseInfoAuthorPrefix, nil)),
styling.Code(item.Author),
styling.Plain(i18n.T(i18nk.BotMsgParseInfoDescriptionPrefix, nil)),
styling.Code(strutil.Ellipsis(item.Description, 233)),
styling.Blockquote(strutil.Ellipsis(item.Description, 233), true),
styling.Plain(i18n.T(i18nk.BotMsgParseInfoFileCountPrefix, nil)),
styling.Code(fmt.Sprintf("%d", len(item.Resources))),
styling.Plain(i18n.T(i18nk.BotMsgParseInfoTotalSizePrefix, nil)),