aboutsummaryrefslogtreecommitdiff
path: root/events/roomcanonicalaliasevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'events/roomcanonicalaliasevent.h')
-rw-r--r--events/roomcanonicalaliasevent.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/events/roomcanonicalaliasevent.h b/events/roomcanonicalaliasevent.h
index 87219be6..72620d74 100644
--- a/events/roomcanonicalaliasevent.h
+++ b/events/roomcanonicalaliasevent.h
@@ -22,18 +22,17 @@
namespace QMatrixClient
{
- class RoomCanonicalAliasEvent: public Event
+ class RoomCanonicalAliasEvent : public RoomEvent
{
public:
- RoomCanonicalAliasEvent();
- virtual ~RoomCanonicalAliasEvent();
+ explicit RoomCanonicalAliasEvent(const QJsonObject& obj)
+ : RoomEvent(Type::RoomCanonicalAlias, obj)
+ , _canonicalAlias(contentJson()["alias"].toString())
+ { }
- QString alias();
-
- static RoomCanonicalAliasEvent* fromJson(const QJsonObject& obj);
+ QString alias() const { return _canonicalAlias; }
private:
- class Private;
- Private* d;
+ QString _canonicalAlias;
};
-}
+} // namespace QMatrixClient