aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roomtombstoneevent.h
blob: e336c44835449781cecc3f8c775f69e1585b3575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// SPDX-FileCopyrightText: 2019 Kitsune Ral <Kitsune-Ral@users.sf.net>
// SPDX-License-Identifier: LGPL-2.1-or-later

#pragma once

#include "stateevent.h"

namespace Quotient {
class QUOTIENT_API RoomTombstoneEvent : public StateEventBase {
public:
    DEFINE_EVENT_TYPEID("m.room.tombstone", RoomTombstoneEvent)

    explicit RoomTombstoneEvent() : StateEventBase(typeId(), matrixTypeId()) {}
    explicit RoomTombstoneEvent(const QJsonObject& obj)
        : StateEventBase(typeId(), obj)
    {}

    QString serverMessage() const;
    QString successorRoomId() const;
};
REGISTER_EVENT_TYPE(RoomTombstoneEvent)
} // namespace Quotient
s="p">{ // It's a bit of an overkill to use a full-fledged ImageContent // because in reality m.room.avatar usually only has a single URL, // without a thumbnail. But The Spec says there be thumbnails, and // we follow The Spec. public: DEFINE_EVENT_TYPEID("m.room.avatar", RoomAvatarEvent) explicit RoomAvatarEvent(const QJsonObject& obj) : StateEvent(typeId(), obj) { } QUrl url() const { return content().url; } }; REGISTER_EVENT_TYPE(RoomAvatarEvent) DEFINE_EVENTTYPE_ALIAS(RoomAvatar, RoomAvatarEvent) } // namespace QMatrixClient