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

Fix admin detection in _can_use_commands #468

Merged
merged 1 commit into from
May 22, 2020

Conversation

davidmehren
Copy link
Contributor

I noticed that admins of Telegram groups can't add a portal via the relay bot. After some print-debugging I found that _can_use_commands does not access the participant property, even though the classes it checks for seem to be stored there and not in p directly.

Please note that this is probably a crude fix as it is literally based on inserting prints at various places and changing code randomly 😄

Copy link
Member

@tulir tulir left a comment

Choose a reason for hiding this comment

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

Good catch, thanks!

The ChannelParticipant schema (which is what GetParticipantRequest returns) does indeed say the participant info is in the .participant property.

@tulir tulir merged commit 3a25ee2 into mautrix:master May 22, 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