diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-31 19:07:01 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-31 19:07:01 +0200 |
commit | 945b1ab33c92b7b13e2c6b6ebc1f56c5caee0f79 (patch) | |
tree | eea97650615b13489d3c1bd2528ecc6fe0f53dab | |
parent | 21ae4eca4c06e500ec04a52ad42772bf8e8e9b6f (diff) | |
download | libquotient-945b1ab33c92b7b13e2c6b6ebc1f56c5caee0f79.tar.gz libquotient-945b1ab33c92b7b13e2c6b6ebc1f56c5caee0f79.zip |
Fix Room::getPreviousContent() to match new CS API
There was a fairly nasty change where `from` parameter in /messages
became optional and that led to two QString parameters (`from` and `dir)
switching positions. Because they have the same type, the problem only
shows at runtime. This commit fixes Room::getPreviousContent() to pass
the parameters at right positions; client code won't feel anything
(unless it uses GetRoomEventsJob directly).
-rw-r--r-- | lib/room.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 7022a49d..f85591c7 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -2464,15 +2464,18 @@ void Room::hangupCall(const QString& callId) d->sendEvent<CallHangupEvent>(callId); } -void Room::getPreviousContent(int limit, const QString &filter) { d->getPreviousContent(limit, filter); } +void Room::getPreviousContent(int limit, const QString& filter) +{ + d->getPreviousContent(limit, filter); +} void Room::Private::getPreviousContent(int limit, const QString &filter) { if (isJobPending(eventsHistoryJob)) return; - eventsHistoryJob = - connection->callApi<GetRoomEventsJob>(id, prevBatch, "b", "", limit, filter); + eventsHistoryJob = connection->callApi<GetRoomEventsJob>(id, "b", prevBatch, + "", limit, filter); emit q->eventsHistoryJobChanged(); connect(eventsHistoryJob, &BaseJob::success, q, [this] { prevBatch = eventsHistoryJob->end(); |