mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Prefix internal functions
This commit is contained in:
parent
46df23f581
commit
294e9a0c9b
@ -33,7 +33,7 @@ class DeactivateAccountHandler(BaseHandler):
|
|||||||
|
|
||||||
self._user_parter_running = False
|
self._user_parter_running = False
|
||||||
|
|
||||||
reactor.callWhenRunning(self.start_user_parting)
|
reactor.callWhenRunning(self._start_user_parting)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def deactivate_account(self, user_id):
|
def deactivate_account(self, user_id):
|
||||||
@ -60,14 +60,14 @@ class DeactivateAccountHandler(BaseHandler):
|
|||||||
|
|
||||||
yield self.store.add_user_pending_deactivation(user_id)
|
yield self.store.add_user_pending_deactivation(user_id)
|
||||||
|
|
||||||
self.start_user_parting()
|
self._start_user_parting()
|
||||||
|
|
||||||
def start_user_parting(self):
|
def _start_user_parting(self):
|
||||||
if not self._user_parter_running:
|
if not self._user_parter_running:
|
||||||
run_in_background(self.user_parter_loop())
|
run_in_background(self._user_parter_loop())
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def user_parter_loop(self):
|
def _user_parter_loop(self):
|
||||||
self._user_parter_running = True
|
self._user_parter_running = True
|
||||||
logger.info("Starting user parter")
|
logger.info("Starting user parter")
|
||||||
try:
|
try:
|
||||||
@ -76,7 +76,7 @@ class DeactivateAccountHandler(BaseHandler):
|
|||||||
if user_id is None:
|
if user_id is None:
|
||||||
break
|
break
|
||||||
logger.info("User parter parting %r", user_id)
|
logger.info("User parter parting %r", user_id)
|
||||||
yield self.part_user(user_id)
|
yield self._part_user(user_id)
|
||||||
yield self.store.del_user_pending_deactivation(user_id)
|
yield self.store.del_user_pending_deactivation(user_id)
|
||||||
logger.info("User parter finished parting %r", user_id)
|
logger.info("User parter finished parting %r", user_id)
|
||||||
logger.info("User parter finished: stopping")
|
logger.info("User parter finished: stopping")
|
||||||
@ -84,7 +84,7 @@ class DeactivateAccountHandler(BaseHandler):
|
|||||||
self._user_parter_running = False
|
self._user_parter_running = False
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def part_user(self, user_id):
|
def _part_user(self, user_id):
|
||||||
user = UserID.from_string(user_id)
|
user = UserID.from_string(user_id)
|
||||||
|
|
||||||
rooms_for_user = yield self.store.get_rooms_for_user(user_id)
|
rooms_for_user = yield self.store.get_rooms_for_user(user_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user