From 945b1ab33c92b7b13e2c6b6ebc1f56c5caee0f79 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 31 May 2022 19:07:01 +0200 Subject: 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). --- lib/room.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/room.cpp') 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(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(id, prevBatch, "b", "", limit, filter); + eventsHistoryJob = connection->callApi(id, "b", prevBatch, + "", limit, filter); emit q->eventsHistoryJobChanged(); connect(eventsHistoryJob, &BaseJob::success, q, [this] { prevBatch = eventsHistoryJob->end(); -- cgit v1.2.3