Skip to content

Comments

include power level overrides when creating voice chats, reset voip room view after ending call#698

Merged
Airyzz merged 6 commits intocommetchat:mainfrom
jonathanmajh:main
Feb 23, 2026
Merged

include power level overrides when creating voice chats, reset voip room view after ending call#698
Airyzz merged 6 commits intocommetchat:mainfrom
jonathanmajh:main

Conversation

@jonathanmajh
Copy link
Contributor

@jonathanmajh jonathanmajh commented Feb 18, 2026

I meant to do this as two PRs, but i forgot to make a branch for the 2nd commit

@jonathanmajh jonathanmajh changed the title include calling power level overrides when creating voice chats include power level overrides when creating voice chats, reset voip room view after ending call Feb 18, 2026
if (args.roomType == RoomType.voipRoom) {
creationContent = {"type": "org.matrix.msc3417.call"};
powerLevelContentOverride = {
"events": {
Copy link
Contributor

Choose a reason for hiding this comment

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

This results in a room which doesn't follow the default permissions for other types of events as defined by the homeserver.

For example, on my homeserver the default permissions:

        "events": {
          "m.room.avatar": 50,
          "m.room.canonical_alias": 50,
          "m.room.encryption": 100,
          "m.room.history_visibility": 100,
          "m.room.name": 50,
          "m.room.power_levels": 100,
          "m.room.server_acl": 100,
          "m.room.tombstone": 100
        },

but with this change, its only

        "events": {
          "org.matrix.msc3401.call": 0,
          "org.matrix.msc3401.call.member": 0
        },

Maybe it would be better to create the room with default permissions, and then update them to include the call states afterwards?

Copy link
Contributor Author

@jonathanmajh jonathanmajh Feb 19, 2026

Choose a reason for hiding this comment

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

it's weird since based on my reading of [powerLevelContentOverride] The power level content to override in the default power level event. This object is applied on top of the generated [m.room.power_levels] event content prior to it being sent to the room. Defaults to overriding nothing. i was thinking it only changes what is included in the override,

But it seems like there is some confusion about this anyways
matrix-org/matrix-spec#492

So i'll change it to a separate call later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok can you check again?

Copy link
Contributor

Choose a reason for hiding this comment

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

It seemed to be unreliable getting the permission state here, as matrixRoom.getState only gets states which have already been synced, so i changed it to always fetch state from the homeserver

@Airyzz Airyzz merged commit e5ae0ba into commetchat:main Feb 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants