Skip to content

Fixes #1009 #1010

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixes #1009 #1010

wants to merge 1 commit into from

Conversation

VityaSchel
Copy link

Use EditAdminRequest instead of InviteToChannelRequest for puppet bot relays in channels

FYI this will probably be closed by @tulir so you can always apply this commit as patch when installing mautrix telegram or even easier just make these simple changes in lib/python[your-version]/site-packages/mautrix_telegram/portal.py file to apply them on your selfhosted bridge

)
else:
await invited_by.client(
EditAdminRequest(channel=self.peer, user_id=puppet.tgid, admin_rights=ChatAdminRights(), rank="Bridge")
Copy link
Member

Choose a reason for hiding this comment

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

Users can invite anything, not only relaybots, so the admin title shouldn't be hardcoded

Copy link
Author

Choose a reason for hiding this comment

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

can they invite bots? cause this condition is for bots in channels only which can only be admins who manage channel on behalf of users in the bridged matrix room
I'm open to suggestions on what to rename this rank to, because I think it's required unless you suggest just passing empty string to rank argument. Perhaps "Relay" or "Matrix bot"?

Copy link
Member

Choose a reason for hiding this comment

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

The relay bot has no special status, it's just a random telegram bot that the user is inviting. Users can invite any other bot or user the exact same way

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