Skip to content
Snippets Groups Projects
Unverified Commit b4914681 authored by Amber Brown's avatar Amber Brown Committed by GitHub
Browse files

fix async/await consentresource (#5585)

Fixes #5582
parent 04196a4d
No related branches found
No related tags found
No related merge requests found
Synapse can now handle RestServlets that return coroutines.
......@@ -23,6 +23,8 @@ from six.moves import http_client
import jinja2
from jinja2 import TemplateNotFound
from twisted.internet import defer
from synapse.api.errors import NotFoundError, StoreError, SynapseError
from synapse.config import ConfigError
from synapse.http.server import (
......@@ -139,7 +141,7 @@ class ConsentResource(DirectServeResource):
else:
qualified_user_id = UserID(username, self.hs.hostname).to_string()
u = await self.store.get_user_by_id(qualified_user_id)
u = await defer.maybeDeferred(self.store.get_user_by_id, qualified_user_id)
if u is None:
raise NotFoundError("Unknown user")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment