aboutsummaryrefslogtreecommitdiff
path: root/events/event.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-02-07 15:10:19 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-02-07 15:12:48 +0900
commitb7c1ff183384738f170d53128c684681cb34f3b7 (patch)
treeaf916b51d057c1edaacf32695609c155c0e4533e /events/event.h
parent6a9b1876bf8ebeca398c9c57ef90e01c25a7ada6 (diff)
downloadlibquotient-b7c1ff183384738f170d53128c684681cb34f3b7.tar.gz
libquotient-b7c1ff183384738f170d53128c684681cb34f3b7.zip
RoomEvent/RoomMemberEvent: do not store what can be calculated on the fly
Basically, segments of originalJsonObject() are used as-you-go instead of parsing them upon event creation.
Diffstat (limited to 'events/event.h')
-rw-r--r--events/event.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/events/event.h b/events/event.h
index b5a4d94e..968bc1ad 100644
--- a/events/event.h
+++ b/events/event.h
@@ -167,10 +167,10 @@ namespace QMatrixClient
RoomEvent(Type type, const QJsonObject& rep);
~RoomEvent();
- const QString& id() const { return _id; }
- const QDateTime& timestamp() const { return _serverTimestamp; }
- const QString& roomId() const { return _roomId; }
- const QString& senderId() const { return _senderId; }
+ QString id() const { return _id; }
+ QDateTime timestamp() const;
+ QString roomId() const;
+ QString senderId() const;
bool isRedacted() const { return bool(_redactedBecause); }
const RedactionEvent* redactedBecause() const
{
@@ -202,9 +202,9 @@ namespace QMatrixClient
private:
QString _id;
- QString _roomId;
- QString _senderId;
- QDateTime _serverTimestamp;
+// QString _roomId;
+// QString _senderId;
+// QDateTime _serverTimestamp;
event_ptr_tt<RedactionEvent> _redactedBecause;
QString _txnId;
};