aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roomkeyevent.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-03-26 13:25:09 +0100
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-03-26 13:25:09 +0100
commitec4110c63443e29c78fdf0f72af08f5395ec48f7 (patch)
tree9231a07da3124c70758ffa370be8c3ebb8eca3f7 /lib/events/roomkeyevent.h
parent3ba2acce470407854bb38b2633675e916a51a904 (diff)
downloadlibquotient-ec4110c63443e29c78fdf0f72af08f5395ec48f7.tar.gz
libquotient-ec4110c63443e29c78fdf0f72af08f5395ec48f7.zip
Refactoring around Connection::onSyncSuccess()
The method grew large and a bit unwieldy over the years.
Diffstat (limited to 'lib/events/roomkeyevent.h')
-rw-r--r--lib/events/roomkeyevent.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/events/roomkeyevent.h b/lib/events/roomkeyevent.h
index e4bcfd71..679cbf7c 100644
--- a/lib/events/roomkeyevent.h
+++ b/lib/events/roomkeyevent.h
@@ -10,16 +10,10 @@ public:
RoomKeyEvent(const QJsonObject& obj);
- const QString algorithm() const { return _algorithm; }
- const QString roomId() const { return _roomId; }
- const QString sessionId() const { return _sessionId; }
- const QString sessionKey() const { return _sessionKey; }
-
-private:
- QString _algorithm;
- QString _roomId;
- QString _sessionId;
- QString _sessionKey;
+ QString algorithm() const { return content<QString>("algorithm"_ls); }
+ QString roomId() const { return content<QString>("room_id"_ls); }
+ QString sessionId() const { return content<QString>("session_id"_ls); }
+ QString sessionKey() const { return content<QString>("session_key"_ls); }
};
REGISTER_EVENT_TYPE(RoomKeyEvent)
} // namespace Quotient