@@ -68,10 +68,6 @@ class MatrixHandler(BaseMatrixHandler):
await portal.handle_matrix_leave(user)
- @staticmethod
- async def allow_bridging_message(user: 'u.User', portal: 'po.Portal') -> bool:
- return user.is_whitelisted and bool(user.username)
-
# @staticmethod
# async def handle_redaction(room_id: RoomID, user_id: UserID, event_id: EventID,
# redaction_event_id: EventID) -> None:
@@ -65,6 +65,9 @@ class User(DBUser, BaseUser):
return None
return Address(uuid=self.uuid, number=self.username)
+ async def is_logged_in(self) -> bool:
+ return bool(self.username)
+
async def on_signin(self, account: Account) -> None:
self.username = account.username
self.uuid = account.uuid