Allow anyone to react in read-only rooms

This commit is contained in:
Cadence Ember 2025-02-19 13:53:45 +13:00
parent 6e00066048
commit 6eed4ec54a
3 changed files with 9 additions and 0 deletions

View file

@ -146,6 +146,9 @@ async function channelToKState(channel, guild, di) {
/** @type {Ty.Event.M_Power_Levels} */
"m.room.power_levels/": {
events_default: everyoneCanSend ? 0 : 50,
events: {
"m.reaction": 0
},
notifications: {
room: everyoneCanMentionEveryone ? 0 : 20
},

View file

@ -153,6 +153,9 @@ test("channel2room: read-only discord channel", async t => {
},
"m.room.power_levels/": {
events_default: 50, // <-- it should be read-only!
events: {
"m.reaction": 0
},
notifications: {
room: 20,
},

View file

@ -74,6 +74,9 @@ module.exports = {
},
"m.room.power_levels/": {
events_default: 0,
events: {
"m.reaction": 0
},
users: {
"@test_auto_invite:example.org": 100
},