Skip to content

Add federation handling for new reaction permission #16902

@nickvergessen

Description

@nickvergessen
  • Permission check in middleware does not account for federation
  • Your instance is 34 but the host is 33
    • On update of your instance your permissions expend to add reaction permission
    • If the host changes your permission still on 33, it does not know reaction permission and will make you set your permissiions without reaction
    • Options:
      • 🐌 check in middleware if the server knows the permission via capability (very bad performance wise)
      • Do math when getting permissions update and check capabilities there (still not good, but less often)
      • Add the list of known permissions (max_custom number would be enough) to the request, so the instance can judge from there if it contains all numbers or needs to do some healing
  • Host updates from 33 to 34 after you
    • We should let instances know that the users permissions got modified, but doing that in the migration might not work:
      • Server could be "not reachable" so requests could fail, etc
      • Sending many requests during the update is also not good
      • Next join of the participant should be good enough (we just need to make sure to track and notice the changed permission and store it locally?)
  • Host updates from 33 to 34 before you
    • Currently the migration would simply change your permissions to now include the reaction permission
    • But what if the moderator took that away from you already?
    • Same as above we can/should heal the permissions when joining the room, that is most likely the most important moment and good enough

Originally posted by @nickvergessen in #16835 (review)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions