aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roomevent.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-07-08 19:36:27 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-07-08 19:42:43 +0900
commit36f63f398b8a36e0b276e78eceaf3c4123be6b13 (patch)
treeb15e2dc9f33c0ee0d25a67041446597dd16b020f /lib/events/roomevent.cpp
parenteada787376b9f13e7fdd4e7d127074d5c3b3353e (diff)
downloadlibquotient-36f63f398b8a36e0b276e78eceaf3c4123be6b13.tar.gz
libquotient-36f63f398b8a36e0b276e78eceaf3c4123be6b13.zip
RoomEvent::setRoomId()/setSender()
Diffstat (limited to 'lib/events/roomevent.cpp')
-rw-r--r--lib/events/roomevent.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/events/roomevent.cpp b/lib/events/roomevent.cpp
index 62c2a76d..f1e563ff 100644
--- a/lib/events/roomevent.cpp
+++ b/lib/events/roomevent.cpp
@@ -81,6 +81,16 @@ QString RoomEvent::stateKey() const
return fullJson()[StateKeyKeyL].toString();
}
+void RoomEvent::setRoomId(const QString& roomId)
+{
+ editJson().insert(QStringLiteral("room_id"), roomId);
+}
+
+void RoomEvent::setSender(const QString& senderId)
+{
+ editJson().insert(QStringLiteral("sender"), senderId);
+}
+
void RoomEvent::setTransactionId(const QString& txnId)
{
auto unsignedData = fullJson()[UnsignedKeyL].toObject();