aboutsummaryrefslogtreecommitdiff
path: root/lib/room.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-10 20:18:21 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-10 20:18:21 +0900
commite66cae5fd3e74c5839804e560332e5690709931a (patch)
treeafdef32c421200cd669991d1db05167b9e8d7b36 /lib/room.cpp
parenta0f49a396c9bd2a9f65df2682f8a6618e79c5dc7 (diff)
downloadlibquotient-e66cae5fd3e74c5839804e560332e5690709931a.tar.gz
libquotient-e66cae5fd3e74c5839804e560332e5690709931a.zip
Room::postHtmlMessage() - a facility method to send HTML messages
Diffstat (limited to 'lib/room.cpp')
-rw-r--r--lib/room.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index 06a0a380..b4d0f47c 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -1076,6 +1076,14 @@ void Room::postMessage(const QString& plainText, MessageEventType type)
postMessage(RoomMessageEvent { plainText, type });
}
+void Room::postHtmlMessage(const QString& plainText, const QString& htmlText,
+ MessageEventType type)
+{
+ postMessage(RoomMessageEvent { plainText, type,
+ new EventContent::TextContent(htmlText, QStringLiteral("text/html")) });
+
+}
+
void Room::postMessage(const RoomMessageEvent& event)
{
if (usesEncryption())