Skip to content

Commit

Permalink
rm strip_tags
Browse files Browse the repository at this point in the history
  • Loading branch information
nkonev committed Jan 23, 2025
1 parent 3a50aa7 commit ea5b811
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chat/config/config-dev/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ otlp:
endpoint: "localhost:4317"

previewMaxTextSize: 240
previewMaxTextSizeDb: 280
previewMaxTextSizeDb: 512

# Along with resending, it makes all files in private chat available to GET by any logged in user
canResendFromTetATet: true
Expand Down
2 changes: 1 addition & 1 deletion chat/db/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func getLastMessagePreview(ctx context.Context, co CommonOperations, chatIds []i
if i != 0 {
bldr += " UNION ALL "
}
bldr += fmt.Sprintf("(select %v, substring(strip_tags(text), 0, %v), owner_id from message_chat_%v order by id desc limit 1)", chatId, maxPrevSizeDb, chatId)
bldr += fmt.Sprintf("(select %v, substring(text, 0, %v), owner_id from message_chat_%v order by id desc limit 1)", chatId, maxPrevSizeDb, chatId)
}
rows, err := co.QueryContext(ctx, bldr)
if err != nil {
Expand Down

0 comments on commit ea5b811

Please sign in to comment.