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:
+1
-1
Submodule nobilis updated: c4cdb04503...1bd675c32c
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user