mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
[backend] Remove user from list on unfollow
This commit is contained in:
parent
11b3d4fa0a
commit
d1cf1b5611
@ -7,7 +7,7 @@ import { deliver, webhookDeliver } from "@/queue/index.js";
|
|||||||
import Logger from "../logger.js";
|
import Logger from "../logger.js";
|
||||||
import { registerOrFetchInstanceDoc } from "../register-or-fetch-instance-doc.js";
|
import { registerOrFetchInstanceDoc } from "../register-or-fetch-instance-doc.js";
|
||||||
import type { User } from "@/models/entities/user.js";
|
import type { User } from "@/models/entities/user.js";
|
||||||
import { Followings, Users, Instances } from "@/models/index.js";
|
import { Followings, Users, Instances, UserListJoinings } from "@/models/index.js";
|
||||||
import {
|
import {
|
||||||
instanceChart,
|
instanceChart,
|
||||||
perUserFollowingChart,
|
perUserFollowingChart,
|
||||||
@ -45,6 +45,7 @@ export default async function (
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await UserListJoinings.delete({ userId: followee.id, userList: { userId: follower.id } });
|
||||||
await Followings.delete(following.id);
|
await Followings.delete(following.id);
|
||||||
|
|
||||||
decrementFollowing(follower, followee);
|
decrementFollowing(follower, followee);
|
||||||
|
Loading…
Reference in New Issue
Block a user