fix lint
This commit is contained in:
@@ -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);
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user