Allow un-reacting in read-only rooms

This commit is contained in:
Cadence Ember 2025-04-16 22:42:00 +12:00
commit b0ffb45e55
3 changed files with 7 additions and 3 deletions

View file

@ -147,7 +147,8 @@ async function channelToKState(channel, guild, di) {
"m.room.power_levels/": {
events_default: everyoneCanSend ? 0 : 50,
events: {
"m.reaction": 0
"m.reaction": 0,
"m.room.redaction": 0 // only affects redactions of own events, required to be able to un-react
},
notifications: {
room: everyoneCanMentionEveryone ? 0 : 20

View file

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