aboutsummaryrefslogtreecommitdiff
path: root/events/roomcanonicalaliasevent.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-05-28 13:00:44 +0900
committerGitHub <noreply@github.com>2017-05-28 13:00:44 +0900
commit36dbba9c543b819aec526f18c33f1d95b0ee61c7 (patch)
tree49caf6450be52072d8f1e4e40e2dfb8490d73732 /events/roomcanonicalaliasevent.h
parentced7a66686596e74a1f25b5d9634b9b562870943 (diff)
parenta5e14da86c3299ca8d36eb4a4eb58ce2a245dc4e (diff)
downloadlibquotient-36dbba9c543b819aec526f18c33f1d95b0ee61c7.tar.gz
libquotient-36dbba9c543b819aec526f18c33f1d95b0ee61c7.zip
Merge pull request #65 from QMatrixClient/kitsune-simplify-events
Events refactoring
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