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

Set RestrictMessageSending in portal create+update #232

Merged
merged 1 commit into from
Oct 24, 2020

Conversation

rreuvekamp
Copy link
Contributor

@rreuvekamp rreuvekamp commented Oct 12, 2020

Fixes #228

Bridge didn't set the power level for message sending correctly when the bridge user is invited to a WA-group that was already set to 'announce'-mode (=only admins can send message).
It did already bridge it correctly when the setting is toggled while we're in the group. (Using ChatUpdate with ChatActionType Announce)

In this patch I've added a call to RestrictMessageSending in CreateMatrixRoom which should fix it for new groups bridge users join. I could have also added a state event in the initialState slice, instead of calling RestrictMessageSending separately, but that would make it more complex imo. Let you know if you'd want me to change it.

The extra call to RestrictMessageSending in UpdateMetadata is included to fix it for existing groups as well. Works perfectly here!

With best regards,

Remi

@tulir tulir self-requested a review October 12, 2020 12:59
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.

Looks sensible, thanks!

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.

bridge 'only admins can send messages' to matrix
2 participants