Skip to content
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

feat: leave rooms with more than 2 users #43

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

bolinocroustibat
Copy link
Contributor

@bolinocroustibat bolinocroustibat commented May 29, 2024

Draft PR related to #7

@nrolin
Copy link
Contributor

nrolin commented May 29, 2024

If I'm not mistaken one could invite the bot to a salon, and if the bot is the first (which is likely to be the case if he's invited as the same time as others) to answer he will join and not left.

The matrix client has a list_direct_rooms method, so it shouldn't be that hard to know if it is a direct room or not

@bolinocroustibat bolinocroustibat marked this pull request as draft May 29, 2024 15:51
@bolinocroustibat bolinocroustibat self-assigned this May 29, 2024
@nrolin
Copy link
Contributor

nrolin commented May 29, 2024

If I'm not mistaken one could invite the bot to a salon, and if the bot is the first (which is likely to be the case if he's invited as the same time as others) to answer he will join and not left.

The matrix client has a list_direct_rooms method, so it shouldn't be that hard to know if it is a direct room or not

After looking at the code, it seems the simpler will be to list the direct message rooms with list_direct_rooms and verify the id of the current room is in. The question is whether the list is updated fast enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants