10 lines
340 B
JavaScript
10 lines
340 B
JavaScript
import { importShowMuteDialog } from '../_components/dialog/asyncDialogs'
|
|
import { setAccountMuted } from './mute'
|
|
|
|
export async function toggleMute (account, mute) {
|
|
if (mute) {
|
|
(await importShowMuteDialog())(account)
|
|
} else {
|
|
await setAccountMuted(account.id, mute, /* notifications */ false, /* toastOnSuccess */ true)
|
|
}
|
|
}
|