feat: add setting for character limit of truncated deleted messages (#6491)
This commit is contained in:
committed by
GitHub
parent
a7de887ee0
commit
1d06086bb9
@@ -331,14 +331,15 @@ void makeModerateMessage(
|
||||
|
||||
builder.emplaceSystemTextAndUpdate("saying:", text);
|
||||
|
||||
if (action.messageBody.view().length() > 50)
|
||||
auto limit = getSettings()->deletedMessageLengthLimit.getValue();
|
||||
if (limit > 0 && action.messageBody.view().length() > limit)
|
||||
{
|
||||
builder
|
||||
.emplace<TextElement>(action.messageBody.qt().left(50) + "…",
|
||||
.emplace<TextElement>(action.messageBody.qt().left(limit) + "…",
|
||||
MessageElementFlag::Text, MessageColor::Text)
|
||||
->setLink({Link::JumpToMessage, action.messageID.qt()});
|
||||
|
||||
text.append(action.messageBody.qt().left(50) + "…");
|
||||
text.append(action.messageBody.qt().left(limit) + "…");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user