mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
Add basic application_services SQL, and hook up parts of the appservice store to read from it.
This commit is contained in:
parent
b46fa8603e
commit
42876969b9
5 changed files with 117 additions and 16 deletions
|
@ -16,7 +16,7 @@
|
|||
from twisted.internet import defer
|
||||
|
||||
from ._base import BaseHandler
|
||||
from synapse.api.errors import StoreError, SynapseError
|
||||
from synapse.api.errors import Codes, StoreError, SynapseError
|
||||
|
||||
import logging
|
||||
|
||||
|
@ -36,11 +36,12 @@ class ApplicationServicesHandler(BaseHandler):
|
|||
try:
|
||||
stored_service = yield self.store.get_app_service(app_service.token)
|
||||
if not stored_service:
|
||||
raise StoreError(404, "Not found")
|
||||
raise StoreError(404, "Application Service Not found")
|
||||
except StoreError:
|
||||
raise SynapseError(
|
||||
403, "Unrecognised application services token. "
|
||||
"Consult the home server admin."
|
||||
"Consult the home server admin.",
|
||||
errcode=Codes.FORBIDDEN
|
||||
)
|
||||
# TODO store this AS
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue