From 36344a6e0283f924b72cb2b25001bdf212a7e707 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 26 Jul 2022 23:06:50 +0200 Subject: ...and the definitive fix --- lib/events/simplestateevents.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/events') diff --git a/lib/events/simplestateevents.h b/lib/events/simplestateevents.h index 46e1b3a7..a8eaab56 100644 --- a/lib/events/simplestateevents.h +++ b/lib/events/simplestateevents.h @@ -34,10 +34,7 @@ DEFINE_SIMPLE_STATE_EVENT(RoomPinnedEvent, "m.room.pinned_messages", QStringList, pinnedEvents) constexpr auto RoomAliasesEventKey = "aliases"_ls; -class Q_DECL_DEPRECATED_X( - "m.room.aliases events are deprecated by the Matrix spec; use" - " RoomCanonicalAliasEvent::altAliases() to get non-authoritative aliases") - QUOTIENT_API RoomAliasesEvent +class QUOTIENT_API RoomAliasesEvent : public StateEvent< EventContent::SingleKeyValue> { public: @@ -45,7 +42,13 @@ public: explicit RoomAliasesEvent(const QJsonObject& obj) : StateEvent(typeId(), obj) {} + Q_DECL_DEPRECATED_X( + "m.room.aliases events are deprecated by the Matrix spec; use" + " RoomCanonicalAliasEvent::altAliases() to get non-authoritative aliases") QString server() const { return stateKey(); } + Q_DECL_DEPRECATED_X( + "m.room.aliases events are deprecated by the Matrix spec; use" + " RoomCanonicalAliasEvent::altAliases() to get non-authoritative aliases") QStringList aliases() const { return content().value; } }; } // namespace Quotient -- cgit v1.2.3