diff options
-rw-r--r-- | events/event.cpp | 4 | ||||
-rw-r--r-- | room.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/events/event.cpp b/events/event.cpp index d779f293..354aed03 100644 --- a/events/event.cpp +++ b/events/event.cpp @@ -87,6 +87,8 @@ RoomEvent::RoomEvent(Event::Type type) : Event(type) { } RoomEvent::RoomEvent(Type type, const QJsonObject& rep) : Event(type, rep), _id(rep["event_id"].toString()) , _roomId(rep["room_id"].toString()) + , _serverTimestamp( + QMatrixClient::fromJson<QDateTime>(rep["origin_server_ts"])) , _senderId(rep["sender"].toString()) { // if (_id.isEmpty()) @@ -112,8 +114,6 @@ RoomEvent::RoomEvent(Type type, const QJsonObject& rep) return; } - _serverTimestamp = - QMatrixClient::fromJson<QDateTime>(rep["origin_server_ts"]); _txnId = unsignedData.value("transactionId").toString(); if (!_txnId.isEmpty()) qCDebug(EVENTS) << "Event transactionId:" << _txnId; @@ -716,7 +716,7 @@ void Room::Private::processRedaction(const RedactionEvent* redaction) } static const QStringList keepKeys = { "event_id", "type", "room_id", "sender", "state_key", - "prev_content", "content" }; + "prev_content", "content", "origin_server_ts" }; static const std::vector<std::pair<EventType, QStringList>> keepContentKeysMap { { Event::Type::RoomMember, { "membership" } } |