2019-10-30 02:58:49 +01:00
|
|
|
import { importShowMuteDialog } from '../_components/dialog/asyncDialogs/importShowMuteDialog.js'
|
2021-07-05 05:19:04 +02:00
|
|
|
import { setAccountMuted } from './mute.js'
|
2019-02-19 00:43:41 +01:00
|
|
|
|
|
|
|
export async function toggleMute (account, mute) {
|
|
|
|
if (mute) {
|
|
|
|
(await importShowMuteDialog())(account)
|
|
|
|
} else {
|
|
|
|
await setAccountMuted(account.id, mute, /* notifications */ false, /* toastOnSuccess */ true)
|
|
|
|
}
|
|
|
|
}
|