aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn <johndrummond0@gmail.com>2020-10-27 00:38:29 +0000
committerJohn <johndrummond0@gmail.com>2020-10-27 00:38:29 +0000
commit4b50702e014007d19cc89c2118da0af2b01b976b (patch)
tree636fb7744b16051045084ec10aa95f6aaa78ffc0 /lib
parent6e4e22cfa4a807ab18fbf1d704f312d0876a4ef5 (diff)
downloadlibquotient-4b50702e014007d19cc89c2118da0af2b01b976b.tar.gz
libquotient-4b50702e014007d19cc89c2118da0af2b01b976b.zip
Added filter param to getPreviousContent so that a server side filter
can be applied.
Diffstat (limited to 'lib')
-rw-r--r--lib/room.cpp8
-rw-r--r--lib/room.h2
2 files changed, 5 insertions, 5 deletions
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<CallHangupEvent>(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<GetRoomEventsJob>(id, prevBatch, "b", "", limit);
+ connection->callApi<GetRoomEventsJob>(id, prevBatch, "b", "", limit, filter);
emit q->eventsHistoryJobChanged();
connect(eventsHistoryJob, &BaseJob::success, q, [=] {
prevBatch = eventsHistoryJob->end();
diff --git a/lib/room.h b/lib/room.h
index 7fc03c19..4be3ed2b 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -555,7 +555,7 @@ public slots:
/// You shouldn't normally call this method; it's here for debugging
void refreshDisplayName();
- void getPreviousContent(int limit = 10);
+ void getPreviousContent(int limit = 10, const QString &filter = {});
void inviteToRoom(const QString& memberId);
LeaveRoomJob* leaveRoom();