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:42:24 +0900 |
commit | f13d54bd9931a340af862cc0a03af2ac68fe5e06 (patch) | |
tree | 282e66195248741d315b7158fdea6b7416fc219f /lib/room.cpp | |
parent | 8c685b4ae5b47e55a55f23e16ccbda0132cb60c5 (diff) | |
download | libquotient-f13d54bd9931a340af862cc0a03af2ac68fe5e06.tar.gz libquotient-f13d54bd9931a340af862cc0a03af2ac68fe5e06.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 f2e03e94..dbddad05 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, |