mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Dependency inject ApplicationServiceApi when creating ApplicationServicesHandler.
This commit is contained in:
parent
a3c6010718
commit
11e6b3d18b
3 changed files with 9 additions and 11 deletions
|
@ -18,7 +18,6 @@ from twisted.internet import defer
|
|||
from synapse.api.constants import EventTypes
|
||||
from synapse.api.errors import Codes, StoreError, SynapseError
|
||||
from synapse.appservice import ApplicationService
|
||||
from synapse.appservice.api import ApplicationServiceApi
|
||||
from synapse.types import UserID
|
||||
import synapse.util.stringutils as stringutils
|
||||
|
||||
|
@ -32,10 +31,10 @@ logger = logging.getLogger(__name__)
|
|||
# easier.
|
||||
class ApplicationServicesHandler(object):
|
||||
|
||||
def __init__(self, hs):
|
||||
def __init__(self, hs, appservice_api):
|
||||
self.store = hs.get_datastore()
|
||||
self.hs = hs
|
||||
self.appservice_api = ApplicationServiceApi(hs)
|
||||
self.appservice_api = appservice_api
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def register(self, app_service):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue