Skip to content

Support for creator power level #4937

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

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft

Support for creator power level #4937

wants to merge 4 commits into from

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Jul 23, 2025

Adds support for infinite power level specified by MSC4289.

This version removes powerLevelNorm which we only use in one place in Element Web (where we probably should not) and I'm not sure is generally that sensible, so I've removed it since it's a difficult concept to keep and would at best be a slight lie when one of the PLs is always infinity (eg. we'd have to say creator is also 100, probably). This makes this a BREAKING CHANGE.

I'll leave this as draft until I have a matching PR for element.

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

Adds support for infinite power level specified by [MSC4289](matrix-org/matrix-spec-proposals#4289).
const createEvent = this.getStateEvents(EventType.RoomCreate, "");
if (!createEvent) {
if (!this.getVersionWarning) {
logger.warn("[getVersion] Room " + this.roomId + " does not have an m.room.create event");

Check warning

Code scanning / SonarCloud

Deprecated APIs should not be used Medium

'logger' is deprecated. See more on SonarQube Cloud
return "1";
}
return createEvent.getContent()["room_version"] ?? "1";
return this.currentState.getRoomVersion();

Check warning

Code scanning / SonarCloud

Deprecated APIs should not be used Medium

'currentState' is deprecated. See more on SonarQube Cloud
as room versions strings aren't ordered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants