This commit is contained in:
syuilo
2021-12-09 23:58:30 +09:00
parent 0abe2dfee0
commit c69b72e199
573 changed files with 3318 additions and 3318 deletions

View File

@@ -36,7 +36,7 @@ export default async function(blocker: User, blockee: User) {
async function cancelRequest(follower: User, followee: User) {
const request = await FollowRequests.findOne({
followeeId: followee.id,
followerId: follower.id
followerId: follower.id,
});
if (request == null) {
@@ -45,18 +45,18 @@ async function cancelRequest(follower: User, followee: User) {
await FollowRequests.delete({
followeeId: followee.id,
followerId: follower.id
followerId: follower.id,
});
if (Users.isLocalUser(followee)) {
Users.pack(followee, followee, {
detail: true
detail: true,
}).then(packed => publishMainStream(followee.id, 'meUpdated', packed));
}
if (Users.isLocalUser(follower)) {
Users.pack(followee, follower, {
detail: true
detail: true,
}).then(packed => {
publishUserEvent(follower.id, 'unfollow', packed);
publishMainStream(follower.id, 'unfollow', packed);
@@ -79,7 +79,7 @@ async function cancelRequest(follower: User, followee: User) {
async function unFollow(follower: User, followee: User) {
const following = await Followings.findOne({
followerId: follower.id,
followeeId: followee.id
followeeId: followee.id,
});
if (following == null) {
@@ -101,7 +101,7 @@ async function unFollow(follower: User, followee: User) {
// Publish unfollow event
if (Users.isLocalUser(follower)) {
Users.pack(followee, follower, {
detail: true
detail: true,
}).then(packed => {
publishUserEvent(follower.id, 'unfollow', packed);
publishMainStream(follower.id, 'unfollow', packed);

View File

@@ -11,7 +11,7 @@ const logger = new Logger('blocking/delete');
export default async function(blocker: User, blockee: User) {
const blocking = await Blockings.findOne({
blockerId: blocker.id,
blockeeId: blockee.id
blockeeId: blockee.id,
});
if (blocking == null) {