From 149ca0542320d0c65c87a38153d7aa3d3017030f Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Tue, 22 Nov 2022 15:38:24 +0100 Subject: [PATCH] Add "plain" command to send a message without any formatting Fixes #532 --- src/actionsmodel.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/actionsmodel.cpp b/src/actionsmodel.cpp index bb47c9000..12391cf8a 100644 --- a/src/actionsmodel.cpp +++ b/src/actionsmodel.cpp @@ -99,6 +99,17 @@ QVector actions{ kli18n(""), 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(""), + kli18n("Sends the given given message as plain text"), + }, Action{ QStringLiteral("spoiler"), [](const QString &text, NeoChatRoom *room) {