mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
feat: Mute and unfollow when blocking a user
This commit is contained in:
parent
c1ca955d57
commit
2fac398b97
@ -125,11 +125,20 @@ export function getUserMenu(user, router: Router = mainRouter) {
|
||||
)
|
||||
return;
|
||||
|
||||
os.apiWithDialog(user.isBlocking ? "blocking/delete" : "blocking/create", {
|
||||
await os.apiWithDialog(user.isBlocking ? "blocking/delete" : "blocking/create", {
|
||||
userId: user.id,
|
||||
}).then(() => {
|
||||
})
|
||||
user.isBlocking = !user.isBlocking;
|
||||
await os.api(user.isBlocking ? "mute/create" : "mute/delete", {
|
||||
userId: user.id,
|
||||
})
|
||||
user.isMuted = user.isBlocking;
|
||||
if (user.isBlocking) {
|
||||
await os.api('following/delete', {
|
||||
userId: user.id,
|
||||
});
|
||||
user.isFollowing = false
|
||||
}
|
||||
}
|
||||
|
||||
async function toggleSilence() {
|
||||
|
Loading…
Reference in New Issue
Block a user