diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-03-14 07:42:24 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-03-14 07:45:04 +0900 |
commit | d6cddf3e016a4fe3e906e2ab815a1e8b775c284c (patch) | |
tree | 5536ada551effdd6e3c67e626f141a20ce078ca7 /lib/room.cpp | |
parent | d9452a731a1983d9b5d3f8cd419b09299c30996e (diff) | |
download | libquotient-d6cddf3e016a4fe3e906e2ab815a1e8b775c284c.tar.gz libquotient-d6cddf3e016a4fe3e906e2ab815a1e8b775c284c.zip |
Fix read receipts and redactions on v3 rooms
Previously slashes in eventIds (that come plenty in v3 due to base64 encoding) were not properly encoded - they are now.
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index a4946b65..7494917d 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -579,8 +579,8 @@ Room::Changes Room::Private::markMessagesAsRead(rev_iter_t upToMarker) { if ((*upToMarker)->senderId() != q->localUser()->id()) { - connection->callApi<PostReceiptJob>(id, "m.read", - (*upToMarker)->id()); + connection->callApi<PostReceiptJob>(id, QStringLiteral("m.read"), + QUrl::toPercentEncoding((*upToMarker)->id())); break; } } @@ -1734,8 +1734,8 @@ void Room::unban(const QString& userId) void Room::redactEvent(const QString& eventId, const QString& reason) { - connection()->callApi<RedactEventJob>( - id(), eventId, connection()->generateTxnId(), reason); + connection()->callApi<RedactEventJob>(id(), + QUrl::toPercentEncoding(eventId), connection()->generateTxnId(), reason); } void Room::uploadFile(const QString& id, const QUrl& localFilename, |