Replace newlines with spaces for non-admins.

This commit is contained in:
John Preston
2025-11-15 11:52:15 +04:00
parent d7c0f9dee8
commit f56825c526

View File

@@ -649,9 +649,12 @@ void MessagesUi::setContent(MessageView &entry) {
} else {
entry.price = Ui::Text::String();
}
const auto composed = entry.admin
auto composed = entry.admin
? entry.original
: Ui::Text::Link(name, 1).append(' ').append(entry.original);
if (!entry.admin) {
composed.text.replace(QChar('\n'), QChar(' '));
}
entry.text = Ui::Text::String(
st::messageTextStyle,
composed,