aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--room.cpp11
-rw-r--r--room.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/room.cpp b/room.cpp
index d5079711..4270875c 100644
--- a/room.cpp
+++ b/room.cpp
@@ -862,6 +862,17 @@ void Room::postMessage(const RoomMessageEvent& event)
connection()->callApi<SendEventJob>(id(), event);
}
+void Room::setName(const QString& newName)
+{
+ connection()->callApi<SetRoomStateJob>(id(), RoomNameEvent(newName));
+}
+
+void Room::setCanonicalAlias(const QString& newAlias)
+{
+ connection()->callApi<SetRoomStateJob>(id(),
+ RoomCanonicalAliasEvent(newAlias));
+}
+
void Room::setTopic(const QString& newTopic)
{
RoomTopicEvent evt(newTopic);
diff --git a/room.h b/room.h
index b908a763..0a9bc2b8 100644
--- a/room.h
+++ b/room.h
@@ -235,6 +235,8 @@ namespace QMatrixClient
/** @deprecated If you have a custom event type, construct the event
* and pass it as a whole to postMessage() */
void postMessage(const QString& type, const QString& plainText);
+ void setName(const QString& newName);
+ void setCanonicalAlias(const QString& newAlias);
void setTopic(const QString& newTopic);
void getPreviousContent(int limit = 10);