From 4faa978f345106cebf49c766397cd0696046cd3c Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 17 Feb 2023 21:46:03 +0100 Subject: [PATCH] Define power levels to disable calls/reactions/redaction/stickers in PM No one but the sender can see them because we cannot bridge them. Blocking them with PLs allows the clients to hide these features from their UI, so users do not mistakenly believe they will be received. --- spec/integ/pm.spec.js | 7 ++++++- src/bridge/IrcHandler.ts | 10 +++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/spec/integ/pm.spec.js b/spec/integ/pm.spec.js index 48aff4f46..027ed0259 100644 --- a/spec/integ/pm.spec.js +++ b/spec/integ/pm.spec.js @@ -284,7 +284,12 @@ describe("IRC-to-Matrix PMing", () => { "m.room.canonical_alias": 100, "m.room.history_visibility": 100, "m.room.power_levels": 100, - "m.room.encryption": 100 + "m.room.encryption": 100, + "m.call.invite": 100, + "m.call.candidate": 100, + "m.reaction": 100, + "m.room.redaction": 100, + "m.sticker": 100, }, invite: 100 }, diff --git a/src/bridge/IrcHandler.ts b/src/bridge/IrcHandler.ts index 6e9168e67..439861ef1 100644 --- a/src/bridge/IrcHandler.ts +++ b/src/bridge/IrcHandler.ts @@ -195,7 +195,15 @@ export class IrcHandler { "m.room.canonical_alias": 100, "m.room.history_visibility": 100, "m.room.power_levels": 100, - "m.room.encryption": 100 + "m.room.encryption": 100, + // Event types that we cannot translate to IRC; + // we might as well block them with PLs so + // Matrix clients can hide them from their UI. + "m.call.invite": 100, + "m.call.candidate": 100, + "m.reaction": 100, + "m.room.redaction": 100, + "m.sticker": 100, }, invite: 100, },