aboutsummaryrefslogtreecommitdiff
path: root/room.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-09-15 18:43:29 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-09-21 20:59:14 +0900
commitd51e7a43736096eb2776acd99e1aab6deeb65667 (patch)
tree3b9044cae8de81ba05f8b71f097705daef480227 /room.cpp
parent4eeecd2cf3c9a33878974b93211b29df891ecc9a (diff)
downloadlibquotient-d51e7a43736096eb2776acd99e1aab6deeb65667.tar.gz
libquotient-d51e7a43736096eb2776acd99e1aab6deeb65667.zip
jobs: SetRoomStateJob (with or without state key); setting room topic
Diffstat (limited to 'room.cpp')
-rw-r--r--room.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/room.cpp b/room.cpp
index ae8c7e63..2ba3766a 100644
--- a/room.cpp
+++ b/room.cpp
@@ -26,6 +26,7 @@
#include <QtCore/QHash>
#include <QtCore/QStringBuilder> // for efficient string concats (operator%)
#include <QtCore/QElapsedTimer>
+#include <jobs/setroomstatejob.h>
#include "connection.h"
#include "state.h"
@@ -595,6 +596,12 @@ void Room::postMessage(RoomMessageEvent* event)
connection()->callApi<SendEventJob>(id(), event);
}
+void Room::setTopic(const QString& newTopic)
+{
+ RoomTopicEvent evt(newTopic);
+ connection()->callApi<SetRoomStateJob>(id(), &evt);
+}
+
void Room::getPreviousContent(int limit)
{
d->getPreviousContent(limit);
@@ -1032,4 +1039,3 @@ bool MemberSorter::operator()(User *u1, User *u2) const
n2.remove(0, 1);
return n1.localeAwareCompare(n2) < 0;
}
-