Muting a Matrix room mutes it everywhere

The mute in a conversation's menu was a preference belonging to this
window. On Matrix the account itself can hold the answer - it is a push
rule, which is what Element writes and what a phone reads - so muting a
room here now quietens it there too. Every other service keeps the local
behaviour, since none of them has anywhere to put it.
This commit is contained in:
2026-09-03 16:05:43 -04:00
parent 541d18d6eb
commit 7786f734c2
2 changed files with 12 additions and 2 deletions
+1 -1
Submodule nobilis updated: c4cdb04503...1bd675c32c
+11 -1
View File
@@ -260,7 +260,17 @@ export function BufferList(): JSX.Element {
// this window only - so the row is there to be seen rather than opened.
onSelect={() => !isJoining(b) && void store.selectBuffer(b.id, false)}
onTogglePin={() => togglePin(b.id)}
onToggleMute={() => toggleMute(b.id)}
onToggleMute={() => {
toggleMute(b.id)
// On Matrix the account itself can hold the answer, so muting here
// mutes on a phone too. Everywhere else this stays what it always
// was: a preference belonging to this window.
if (accounts.find((a) => a.id === b.accountId)?.service === 'matrix') {
void window.moho
.rpc('setMatrixRoomMuted', { bufferId: b.id, muted: !isEffectivelyMuted(b) })
.catch((e: Error) => store.toast('error', e.message))
}
}}
onToggleAutojoin={
b.kind === 'channel' && accounts.find((a) => a.id === b.accountId)?.service === 'irc'
? () => store.toggleAutojoin(b.accountId, bufferDisplayName(b.name))