Skip to content
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

Define power levels to disable calls/reactions/redaction/stickers in PMs initiated from IRC #1663

Merged
merged 19 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelog.d/1663.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- New PM rooms are configured to disable calls, reactions, redactions, and stickers;
as they could not be bridged anyway.
14 changes: 12 additions & 2 deletions spec/integ/pm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,19 @@ 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,
"org.matrix.msc3401.call": 100,
"org.matrix.msc3401.call.member": 100,
"im.vector.modular.widgets": 100,
"io.element.voice_broadcast_info": 100,
"m.call.invite": 100,
"m.call.candidate": 100,
"m.reaction": 100,
"m.room.redaction": 100,
"m.sticker": 100,
},
invite: 100
invite: 100,
redact: 100,
},
}]);
resolve();
Expand Down
15 changes: 14 additions & 1 deletion src/bridge/IrcHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,22 @@ 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,
"org.matrix.msc3401.call": 100,
"org.matrix.msc3401.call.member": 100,
"im.vector.modular.widgets": 100,
"io.element.voice_broadcast_info": 100,
"m.reaction": 100,
"m.room.redaction": 100,
"m.sticker": 100,
},
invite: 100,
redact: 100,
},
type: "m.room.power_levels",
state_key: "",
Expand Down