Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix power level assignment for non-double-puppeted users, some cleanup #333

Merged
merged 1 commit into from
Jan 28, 2023

Conversation

maltee1
Copy link
Contributor

@maltee1 maltee1 commented Jan 4, 2023

Getting a puppet for a double-puppeted user returns the user, if double puppeting is not enabled, it will only return their puppet. This caused non-double-puppeted users to not receive appropriate power level for their account.

This PR also cleans up a few loosely related things:

  1. All remaining GroupV1 support is removed (hopefully)
  2. ChatInfo is now limited to full group info, GroupV2ID is not allowed. I also replaced ChatInfo by GroupV2 in some places. Using ChatInfo for both GroupV2 and GroupV2ID made it necessary to always check for full group info and pass a source to obtain full group info, even if that ended up never being used. I suppose the same is true for Profile and Address, but they're just used a lot less, so it's less annoying

@maltee1 maltee1 force-pushed the fix_user_power_level branch from 1c86c48 to ce4af2b Compare January 16, 2023 12:23
@maltee1 maltee1 force-pushed the fix_user_power_level branch from ce4af2b to 4c91dc8 Compare January 16, 2023 12:41
Comment on lines +2347 to +2349
if not info:
self.log.debug(f"No info provided for updating power levels in {self.mxid}")
return
Copy link
Member

Choose a reason for hiding this comment

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

Returning None from here is not allowed, but the case seems pointless anyway since info is always provided.

@tulir tulir merged commit cb36708 into mautrix:master Jan 28, 2023
@maltee1 maltee1 deleted the fix_user_power_level branch March 19, 2023 12:33
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants