From 4b50702e014007d19cc89c2118da0af2b01b976b Mon Sep 17 00:00:00 2001 From: John Date: Tue, 27 Oct 2020 00:38:29 +0000 Subject: Added filter param to getPreviousContent so that a server side filter can be applied. --- lib/room.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/room.cpp') diff --git a/lib/room.cpp b/lib/room.cpp index eff3d144..f8e6e6ba 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -205,7 +205,7 @@ public: /// A point in the timeline corresponding to baseState rev_iter_t timelineBase() const { return q->findInTimeline(-1); } - void getPreviousContent(int limit = 10); + void getPreviousContent(int limit = 10, const QString &filter = {}); const StateEventBase* getCurrentState(const StateEventKey& evtKey) const { @@ -1832,15 +1832,15 @@ void Room::hangupCall(const QString& callId) d->sendEvent(callId); } -void Room::getPreviousContent(int limit) { d->getPreviousContent(limit); } +void Room::getPreviousContent(int limit, const QString &filter) { d->getPreviousContent(limit, filter); } -void Room::Private::getPreviousContent(int limit) +void Room::Private::getPreviousContent(int limit, const QString &filter) { if (isJobRunning(eventsHistoryJob)) return; eventsHistoryJob = - connection->callApi(id, prevBatch, "b", "", limit); + connection->callApi(id, prevBatch, "b", "", limit, filter); emit q->eventsHistoryJobChanged(); connect(eventsHistoryJob, &BaseJob::success, q, [=] { prevBatch = eventsHistoryJob->end(); -- cgit v1.2.3