aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roomevent.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-31 08:56:38 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-31 08:56:38 +0900
commit0ec67c2f6ba0e122fb7274cec1aaa1ee398b9bfd (patch)
tree793383b93993d71b0a8fb48d22dd619fd75bf791 /lib/events/roomevent.h
parent68358af90bdfbcb6f2884c6d1c795f1724cf840b (diff)
downloadlibquotient-0ec67c2f6ba0e122fb7274cec1aaa1ee398b9bfd.tar.gz
libquotient-0ec67c2f6ba0e122fb7274cec1aaa1ee398b9bfd.zip
RoomEvent: don't store transactionId separately
It's present on the vast minority of events so better be embedded into JSON instead.
Diffstat (limited to 'lib/events/roomevent.h')
-rw-r--r--lib/events/roomevent.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/events/roomevent.h b/lib/events/roomevent.h
index fcbb33e5..a345d176 100644
--- a/lib/events/roomevent.h
+++ b/lib/events/roomevent.h
@@ -35,7 +35,7 @@ namespace QMatrixClient {
Q_PROPERTY(QString senderId READ senderId CONSTANT)
Q_PROPERTY(QString redactionReason READ redactionReason)
Q_PROPERTY(bool isRedacted READ isRedacted)
- Q_PROPERTY(QString transactionId READ transactionId)
+ Q_PROPERTY(QString transactionId READ transactionId WRITE setTransactionId)
public:
using factory_t = EventFactory<RoomEvent>;
@@ -56,7 +56,7 @@ namespace QMatrixClient {
return _redactedBecause;
}
QString redactionReason() const;
- const QString& transactionId() const { return _txnId; }
+ QString transactionId() const;
QString stateKey() const;
/**
@@ -67,7 +67,7 @@ namespace QMatrixClient {
* \param txnId - transaction id, normally obtained from
* Connection::generateTxnId()
*/
- void setTransactionId(const QString& txnId) { _txnId = txnId; }
+ void setTransactionId(const QString& txnId);
/**
* Sets event id for locally created events
@@ -82,7 +82,6 @@ namespace QMatrixClient {
private:
event_ptr_tt<RedactionEvent> _redactedBecause;
- QString _txnId;
};
using RoomEventPtr = event_ptr_tt<RoomEvent>;
using RoomEvents = EventsArray<RoomEvent>;