diff options
author | David Baker <dbkr@matrix.org> | 2014-11-20 17:49:48 +0000 |
---|---|---|
committer | David Baker <dbkr@matrix.org> | 2014-11-20 17:49:48 +0000 |
commit | f1c7f8e8131d6e5531e23e3bc2cd57ab7d1881ae (patch) | |
tree | b1ebd402c0805f475500c9f36a0356322bf26f13 /synapse/rest | |
parent | Separate out the matrix http client completely because just about all of its ... (diff) | |
parent | Fix pep8 codestyle warnings (diff) | |
download | synapse-f1c7f8e8131d6e5531e23e3bc2cd57ab7d1881ae.tar.xz |
Merge branch 'develop' into http_client_refactor
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/events.py | 1 | ||||
-rw-r--r-- | synapse/rest/presence.py | 14 |
2 files changed, 6 insertions, 9 deletions
diff --git a/synapse/rest/events.py b/synapse/rest/events.py index 92ff5e5ca7..3c1b041bfe 100644 --- a/synapse/rest/events.py +++ b/synapse/rest/events.py @@ -26,7 +26,6 @@ import logging logger = logging.getLogger(__name__) - class EventStreamRestServlet(RestServlet): PATTERN = client_path_pattern("/events$") diff --git a/synapse/rest/presence.py b/synapse/rest/presence.py index 138cc88a05..502ed0d4ca 100644 --- a/synapse/rest/presence.py +++ b/synapse/rest/presence.py @@ -117,8 +117,6 @@ class PresenceListRestServlet(RestServlet): logger.exception("JSON parse error") raise SynapseError(400, "Unable to parse content") - deferreds = [] - if "invite" in content: for u in content["invite"]: if not isinstance(u, basestring): @@ -126,8 +124,9 @@ class PresenceListRestServlet(RestServlet): if len(u) == 0: continue invited_user = self.hs.parse_userid(u) - deferreds.append(self.handlers.presence_handler.send_invite( - observer_user=user, observed_user=invited_user)) + yield self.handlers.presence_handler.send_invite( + observer_user=user, observed_user=invited_user + ) if "drop" in content: for u in content["drop"]: @@ -136,10 +135,9 @@ class PresenceListRestServlet(RestServlet): if len(u) == 0: continue dropped_user = self.hs.parse_userid(u) - deferreds.append(self.handlers.presence_handler.drop( - observer_user=user, observed_user=dropped_user)) - - yield defer.DeferredList(deferreds) + yield self.handlers.presence_handler.drop( + observer_user=user, observed_user=dropped_user + ) defer.returnValue((200, {})) |