diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2019-06-04 01:16:01 +1000 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2019-06-04 01:16:01 +1000 |
commit | 6f9f08005cd8973418662c716fec7c808e2cd0b2 (patch) | |
tree | 83af2f021f64c90003b94fce60f839a2bc6192aa /synapse/rest/client/v1/presence.py | |
parent | add stuff in bg updates (diff) | |
parent | Merge pull request #5307 from matrix-org/rav/server_keys/07-fix-notary-cache-... (diff) | |
download | synapse-6f9f08005cd8973418662c716fec7c808e2cd0b2.tar.xz |
Merge remote-tracking branch 'origin/develop' into hawkowl/full-schema-v1
Diffstat (limited to 'synapse/rest/client/v1/presence.py')
-rw-r--r-- | synapse/rest/client/v1/presence.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/synapse/rest/client/v1/presence.py b/synapse/rest/client/v1/presence.py index 045d5a20ac..e263da3cb7 100644 --- a/synapse/rest/client/v1/presence.py +++ b/synapse/rest/client/v1/presence.py @@ -23,21 +23,22 @@ from twisted.internet import defer from synapse.api.errors import AuthError, SynapseError from synapse.handlers.presence import format_user_presence_state -from synapse.http.servlet import parse_json_object_from_request +from synapse.http.servlet import RestServlet, parse_json_object_from_request +from synapse.rest.client.v2_alpha._base import client_patterns from synapse.types import UserID -from .base import ClientV1RestServlet, client_path_patterns - logger = logging.getLogger(__name__) -class PresenceStatusRestServlet(ClientV1RestServlet): - PATTERNS = client_path_patterns("/presence/(?P<user_id>[^/]*)/status") +class PresenceStatusRestServlet(RestServlet): + PATTERNS = client_patterns("/presence/(?P<user_id>[^/]*)/status", v1=True) def __init__(self, hs): - super(PresenceStatusRestServlet, self).__init__(hs) + super(PresenceStatusRestServlet, self).__init__() + self.hs = hs self.presence_handler = hs.get_presence_handler() self.clock = hs.get_clock() + self.auth = hs.get_auth() @defer.inlineCallbacks def on_GET(self, request, user_id): |