Add "plain" command to send a message without any formatting

Fixes #532
This commit is contained in:
Tobias Fella
2022-11-22 15:38:24 +01:00
parent 7ee79ee93a
commit 149ca05423

View File

@@ -99,6 +99,17 @@ QVector<ActionsModel::Action> actions{
kli18n("<message>"),
kli18n("Sends the given emote colored as a rainbow"),
},
Action{
QStringLiteral("plain"),
[](const QString &text, NeoChatRoom *room) {
room->postMessage(text, text.toHtmlEscaped(), RoomMessageEvent::MsgType::Text, {}, {});
return QString();
},
false,
std::nullopt,
kli18n("<message>"),
kli18n("Sends the given given message as plain text"),
},
Action{
QStringLiteral("spoiler"),
[](const QString &text, NeoChatRoom *room) {