|
@@ -11,12 +11,14 @@ from twisted.web import http
|
|
|
class SynapseDjadhere(object):
|
|
|
def __init__(self, config, account_handler):
|
|
|
self.auth_api_token = config.auth_api_token
|
|
|
+ self.bot_user = config.bot_user
|
|
|
+ self.bot_password = config.bot_password
|
|
|
|
|
|
@defer.inlineCallbacks
|
|
|
def check_password(self, user_id, password):
|
|
|
localpart = user_id.split(":", 1)[0][1:]
|
|
|
|
|
|
- bot = user_id == self.bot_user and password == self.password
|
|
|
+ bot = (localpart == self.bot_user and password == self.bot_password)
|
|
|
|
|
|
djadhere_response = yield treq.post(
|
|
|
'https://adherents.tetaneutral.net/accounts/auth_api/%s/' %
|