aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-12-11 12:23:33 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-12-11 12:23:33 +0900
commitc6720cc8bb8d45ab4d2b7390f076d50cb59cb8d3 (patch)
treef84934cea21fe1a78cb1fc8ee5ad5ec961c9da86
parent501c79f55b5f6cb5df80993330d0b1ae1764024a (diff)
downloadlibquotient-c6720cc8bb8d45ab4d2b7390f076d50cb59cb8d3.tar.gz
libquotient-c6720cc8bb8d45ab4d2b7390f076d50cb59cb8d3.zip
Expose Connection::nextBatchToken()
-rw-r--r--lib/connection.cpp5
-rw-r--r--lib/connection.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 28156d11..76e61ed1 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -412,6 +412,11 @@ void Connection::stopSync()
}
}
+QString Connection::nextBatchToken() const
+{
+ return d->data->lastEvent();
+}
+
PostReceiptJob* Connection::postReceipt(Room* room, RoomEvent* event) const
{
return callApi<PostReceiptJob>(room->id(), "m.read", event->id());
diff --git a/lib/connection.h b/lib/connection.h
index 220f6c8f..9a94aad6 100644
--- a/lib/connection.h
+++ b/lib/connection.h
@@ -390,6 +390,7 @@ namespace QMatrixClient
void sync(int timeout = -1);
void stopSync();
+ QString nextBatchToken() const;
virtual MediaThumbnailJob* getThumbnail(const QString& mediaId,
QSize requestedSize, RunningPolicy policy = BackgroundRequest) const;