-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set-pl command and fixed reply #29
Conversation
Co-authored-by: Tulir Asokan <[email protected]>
Co-authored-by: Tulir Asokan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not what I wanted to do I think. What do you think about turning mark_read into async and check for room_id (this is not tested)?
portal = await self.processor.bridge.get_portal(self.room_id) | ||
return await portal.main_intent.send_notice(self.room_id, message, html=html) | ||
else: | ||
return await self.az.intent.send_notice(self.room_id, message, html=html) | ||
|
||
def mark_read(self) -> Awaitable[None]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def mark_read(self) -> Awaitable[None]: | |
async def mark_read(self) -> Awaitable[None]: |
if not self.is_portal: | ||
return self.az.intent.mark_read(self.room_id, self.event_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not self.is_portal: | |
return self.az.intent.mark_read(self.room_id, self.event_id) | |
if self.room_id in await self.az.intent.get_joined_rooms(): | |
return self.az.intent.mark_read(self.room_id, self.event_id) |
One should probably move the main_intent of the bridge to the event at some point to remove the async of reply, but it is working like this.