diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-11 19:24:38 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-11 19:24:38 +0900 |
commit | 71185be83b646c7d5a2d6d3dc0306710e1f6fdd0 (patch) | |
tree | f8a12212dd14db285f992d0be7ffc6112e1c3d40 /events/event.cpp | |
parent | 5a5ae02e1eb9d58b162d8e3c0b3f837a6719d38f (diff) | |
download | libquotient-71185be83b646c7d5a2d6d3dc0306710e1f6fdd0.tar.gz libquotient-71185be83b646c7d5a2d6d3dc0306710e1f6fdd0.zip |
Whitelist origin_server_ts in redaction logic
The Spec doesn't mention it but both Synapse and Riot act as if origin_server_ts was whitelisted, and it was also confirmed in #matrix-dev to be reasonable behaviour.
Diffstat (limited to 'events/event.cpp')
-rw-r--r-- | events/event.cpp | 4 |
1 files changed, 2 insertions, 2 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; |