summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-08-31 10:42:52 +0100
committerMark Haines <mark.haines@matrix.org>2016-08-31 10:42:52 +0100
commita66225275896c00287e4f627ebbacd6f7b34e6ba (patch)
tree6ae2d3fa03e912e6f752551952724c2d9c336c08 /synapse
parentAdd a replication stream for direct to device messages (diff)
downloadsynapse-a66225275896c00287e4f627ebbacd6f7b34e6ba.tar.xz
Return the current stream position from add_messages_to_device_inbox
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/deviceinbox.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/deviceinbox.py b/synapse/storage/deviceinbox.py
index 27ed1004da..2fa0a218b9 100644
--- a/synapse/storage/deviceinbox.py
+++ b/synapse/storage/deviceinbox.py
@@ -33,7 +33,8 @@ class DeviceInboxStore(SQLBaseStore):
             messages_by_user_and_device(dict):
                 Dictionary of user_id to device_id to message.
         Returns:
-            A deferred that resolves when the messages have been inserted.
+            A deferred stream_id that resolves when the messages have been
+            inserted.
         """
 
         def select_devices_txn(txn, user_id, devices):
@@ -81,6 +82,8 @@ class DeviceInboxStore(SQLBaseStore):
                 stream_id
             )
 
+        defer.returnValue(self._device_inbox_id_gen.get_current_token())
+
     def get_new_messages_for_device(
         self, user_id, device_id, current_stream_id, limit=100
     ):