aboutsummaryrefslogtreecommitdiff
path: root/lib/events
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-08-03 20:22:27 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-08-03 20:22:27 +0900
commited28e010c6423ccec730ca581b8d6d48c2c6cd17 (patch)
treec3e9a152f5a0f7590f61fb3ffabd32992871dd96 /lib/events
parent3f06bbfa88868a8f27c87b56d3b1af7019e4a410 (diff)
downloadlibquotient-ed28e010c6423ccec730ca581b8d6d48c2c6cd17.tar.gz
libquotient-ed28e010c6423ccec730ca581b8d6d48c2c6cd17.zip
RoomEvent: fix wrong JSON key to pick/store transaction id
Diffstat (limited to 'lib/events')
-rw-r--r--lib/events/roomevent.cpp4
-rw-r--r--lib/events/roomevent.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/events/roomevent.cpp b/lib/events/roomevent.cpp
index 738a5f58..e9d74cf6 100644
--- a/lib/events/roomevent.cpp
+++ b/lib/events/roomevent.cpp
@@ -77,7 +77,7 @@ QString RoomEvent::redactionReason() const
QString RoomEvent::transactionId() const
{
- return unsignedJson()["transactionId"_ls].toString();
+ return unsignedJson()["transaction_id"_ls].toString();
}
QString RoomEvent::stateKey() const
@@ -88,7 +88,7 @@ QString RoomEvent::stateKey() const
void RoomEvent::setTransactionId(const QString& txnId)
{
auto unsignedData = fullJson()[UnsignedKeyL].toObject();
- unsignedData.insert(QStringLiteral("transactionId"), txnId);
+ unsignedData.insert(QStringLiteral("transaction_id"), txnId);
editJson().insert(UnsignedKey, unsignedData);
qCDebug(EVENTS) << "New event transactionId:" << txnId;
Q_ASSERT(transactionId() == txnId);
diff --git a/lib/events/roomevent.h b/lib/events/roomevent.h
index a345d176..f057753f 100644
--- a/lib/events/roomevent.h
+++ b/lib/events/roomevent.h
@@ -22,7 +22,8 @@
#include <QtCore/QDateTime>
-namespace QMatrixClient {
+namespace QMatrixClient
+{
class RedactionEvent;
/** This class corresponds to m.room.* events */