diff options
author | Erik Johnston <erik@matrix.org> | 2016-08-08 13:38:13 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-08-08 13:38:13 +0100 |
commit | d330d45e2d6f6af33904d42045329303c0cd3828 (patch) | |
tree | af40c91de6b24b6ff53203fa4b6ccc57159b988f /synapse/handlers/_base.py | |
parent | Merge pull request #959 from evelynmitchell/patch-1 (diff) | |
parent | Capatailize HTML (diff) | |
download | synapse-d330d45e2d6f6af33904d42045329303c0cd3828.tar.xz |
Merge branch 'release-v0.17.0' of github.com:matrix-org/synapse v0.17.0
Diffstat (limited to 'synapse/handlers/_base.py')
-rw-r--r-- | synapse/handlers/_base.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py index c904c6c500..11081a0cd5 100644 --- a/synapse/handlers/_base.py +++ b/synapse/handlers/_base.py @@ -13,14 +13,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +import logging + from twisted.internet import defer -from synapse.api.errors import LimitExceededError +import synapse.types from synapse.api.constants import Membership, EventTypes -from synapse.types import UserID, Requester - - -import logging +from synapse.api.errors import LimitExceededError +from synapse.types import UserID logger = logging.getLogger(__name__) @@ -31,11 +31,15 @@ class BaseHandler(object): Common base class for the event handlers. Attributes: - store (synapse.storage.events.StateStore): + store (synapse.storage.DataStore): state_handler (synapse.state.StateHandler): """ def __init__(self, hs): + """ + Args: + hs (synapse.server.HomeServer): + """ self.store = hs.get_datastore() self.auth = hs.get_auth() self.notifier = hs.get_notifier() @@ -120,7 +124,8 @@ class BaseHandler(object): # and having homeservers have their own users leave keeps more # of that decision-making and control local to the guest-having # homeserver. - requester = Requester(target_user, "", True) + requester = synapse.types.create_requester( + target_user, is_guest=True) handler = self.hs.get_handlers().room_member_handler yield handler.update_membership( requester, |