Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

feat: ✨ accept joins only from allowed users #155

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HarHarLinks
Copy link
Contributor

No description provided.

@HarHarLinks HarHarLinks marked this pull request as ready for review August 20, 2022 18:28
@HarHarLinks HarHarLinks changed the title ✨ accept joins only from allowed users feat: ✨ accept joins only from allowed users Aug 20, 2022
prevents an exploit where an unauthorized user invites an already joined
bot to make it leave
joined_rooms = await self.async_client.joined_rooms()
if room.room_id not in joined_rooms.rooms:
# prevents leaving if already in the room opposed to rejecting invites
await self.async_client.room_leave(room.room_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.

An open question is whether actively rejecting, hence giving the inviter feedback and blocking further invites, is better than simply ignoring invites.

Copy link
Owner

Choose a reason for hiding this comment

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

I think we should ignore by default, but provide a config setting to allow rejection.

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

Successfully merging this pull request may close these issues.

2 participants