summary refs log tree commit diff
path: root/synapse/rest/client/v2_alpha
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2016-11-14 09:52:41 +0000
committerKegan Dougal <kegan@matrix.org>2016-11-14 09:52:41 +0000
commitaf4a1bac5088e8083f55eea05f6fad44208a3a51 (patch)
tree0b4f692fc20917a0621b82a27473c67f7cd860cd /synapse/rest/client/v2_alpha
parentReview comments (diff)
downloadsynapse-af4a1bac5088e8083f55eea05f6fad44208a3a51.tar.xz
Move .observe() up to the cache to make things neater
Diffstat (limited to 'synapse/rest/client/v2_alpha')
-rw-r--r--synapse/rest/client/v2_alpha/sendtodevice.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/synapse/rest/client/v2_alpha/sendtodevice.py b/synapse/rest/client/v2_alpha/sendtodevice.py
index 2ce038c6cd..2187350d42 100644
--- a/synapse/rest/client/v2_alpha/sendtodevice.py
+++ b/synapse/rest/client/v2_alpha/sendtodevice.py
@@ -43,13 +43,10 @@ class SendToDeviceRestServlet(servlet.RestServlet):
         self.txns = HttpTransactionCache()
         self.device_message_handler = hs.get_device_message_handler()
 
-    @defer.inlineCallbacks
     def on_PUT(self, request, message_type, txn_id):
-        observable = self.txns.fetch_or_execute_request(
+        return self.txns.fetch_or_execute_request(
             request, self._put, request, message_type, txn_id
         )
-        res = yield observable.observe()
-        defer.returnValue(res)
 
     @defer.inlineCallbacks
     def _put(self, request, message_type, txn_id):