Revert Context iter changes in 87dc1a44b2 and fix a f-string
Closes #185
This commit is contained in:
@@ -38,7 +38,10 @@ class Context:
|
|||||||
self.session_container = session_container # type: AlchemySessionContainer
|
self.session_container = session_container # type: AlchemySessionContainer
|
||||||
self.public_website = public_website # type: PublicBridgeWebsite
|
self.public_website = public_website # type: PublicBridgeWebsite
|
||||||
self.provisioning_api = provisioning_api # type: ProvisioningAPI
|
self.provisioning_api = provisioning_api # type: ProvisioningAPI
|
||||||
self.t = (self.az, self.db, self.config, self.loop, self.bot)
|
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return iter(self.t)
|
yield self.az
|
||||||
|
yield self.db
|
||||||
|
yield self.config
|
||||||
|
yield self.loop
|
||||||
|
yield self.bot
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ class MatrixHandler:
|
|||||||
self.log.debug(f"Ignoring message \"{message}\" from {sender} to {room}:"
|
self.log.debug(f"Ignoring message \"{message}\" from {sender} to {room}:"
|
||||||
" User is not whitelisted.")
|
" User is not whitelisted.")
|
||||||
return
|
return
|
||||||
self.log.debug("Received Matrix event \"{message}\" from {sender} in {room}")
|
self.log.debug(f"Received Matrix event \"{message}\" from {sender} in {room}")
|
||||||
|
|
||||||
portal = Portal.get_by_mxid(room)
|
portal = Portal.get_by_mxid(room)
|
||||||
if not is_command and portal and (await sender.is_logged_in() or portal.has_bot):
|
if not is_command and portal and (await sender.is_logged_in() or portal.has_bot):
|
||||||
|
|||||||
Reference in New Issue
Block a user