Skip to content

set-pl command and fixed reply#29

Merged
tulir merged 6 commits intomautrix:masterfrom
witchent:patch-3
Oct 8, 2020
Merged

set-pl command and fixed reply#29
tulir merged 6 commits intomautrix:masterfrom
witchent:patch-3

Conversation

@witchent
Copy link
Contributor

@witchent witchent commented Oct 7, 2020

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.

Co-authored-by: Tulir Asokan <tulir@maunium.net>
Co-authored-by: Tulir Asokan <tulir@maunium.net>
Copy link
Contributor Author

@witchent witchent left a 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)?

else:
return await self.az.intent.send_notice(self.room_id, message, html=html)

def mark_read(self) -> Awaitable[None]:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def mark_read(self) -> Awaitable[None]:
async def mark_read(self) -> Awaitable[None]:

Comment on lines +148 to +149
if not self.is_portal:
return self.az.intent.mark_read(self.room_id, self.event_id)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)

@tulir tulir changed the base branch from release-0.7 to master October 8, 2020 11:37
@tulir tulir merged commit 26fdc77 into mautrix:master Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants