diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-09-15 18:43:29 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-09-21 20:59:14 +0900 |
commit | d51e7a43736096eb2776acd99e1aab6deeb65667 (patch) | |
tree | 3b9044cae8de81ba05f8b71f097705daef480227 /room.cpp | |
parent | 4eeecd2cf3c9a33878974b93211b29df891ecc9a (diff) | |
download | libquotient-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.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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; } - |