fix lint
This commit is contained in:
@@ -8,7 +8,7 @@ import { FollowRequests, Users } from '@/models/index';
|
||||
*/
|
||||
export default async function(user: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }) {
|
||||
const requests = await FollowRequests.find({
|
||||
followeeId: user.id
|
||||
followeeId: user.id,
|
||||
});
|
||||
|
||||
for (const request of requests) {
|
||||
|
||||
@@ -11,7 +11,7 @@ import { IdentifiableError } from '@/misc/identifiable-error';
|
||||
export default async function(followee: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }, follower: User) {
|
||||
const request = await FollowRequests.findOne({
|
||||
followeeId: followee.id,
|
||||
followerId: follower.id
|
||||
followerId: follower.id,
|
||||
});
|
||||
|
||||
if (request == null) {
|
||||
@@ -26,6 +26,6 @@ export default async function(followee: { id: User['id']; host: User['host']; ur
|
||||
}
|
||||
|
||||
Users.pack(followee.id, followee, {
|
||||
detail: true
|
||||
detail: true,
|
||||
}).then(packed => publishMainStream(followee.id, 'meUpdated', packed));
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ export default async function(followee: { id: User['id']; host: User['host']; ur
|
||||
|
||||
const request = await FollowRequests.findOne({
|
||||
followeeId: followee.id,
|
||||
followerId: follower.id
|
||||
followerId: follower.id,
|
||||
});
|
||||
|
||||
if (request == null) {
|
||||
@@ -27,10 +27,10 @@ export default async function(followee: { id: User['id']; host: User['host']; ur
|
||||
|
||||
await FollowRequests.delete({
|
||||
followeeId: followee.id,
|
||||
followerId: follower.id
|
||||
followerId: follower.id,
|
||||
});
|
||||
|
||||
Users.pack(followee.id, followee, {
|
||||
detail: true
|
||||
detail: true,
|
||||
}).then(packed => publishMainStream(followee.id, 'meUpdated', packed));
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export default async function(follower: { id: User['id']; host: User['host']; ur
|
||||
Blockings.findOne({
|
||||
blockerId: followee.id,
|
||||
blockeeId: follower.id,
|
||||
})
|
||||
}),
|
||||
]);
|
||||
|
||||
if (blocking != null) throw new Error('blocking');
|
||||
@@ -38,7 +38,7 @@ export default async function(follower: { id: User['id']; host: User['host']; ur
|
||||
followerSharedInbox: Users.isRemoteUser(follower) ? follower.sharedInbox : undefined,
|
||||
followeeHost: followee.host,
|
||||
followeeInbox: Users.isRemoteUser(followee) ? followee.inbox : undefined,
|
||||
followeeSharedInbox: Users.isRemoteUser(followee) ? followee.sharedInbox : undefined
|
||||
followeeSharedInbox: Users.isRemoteUser(followee) ? followee.sharedInbox : undefined,
|
||||
});
|
||||
|
||||
// Publish receiveRequest event
|
||||
@@ -46,13 +46,13 @@ export default async function(follower: { id: User['id']; host: User['host']; ur
|
||||
Users.pack(follower.id, followee).then(packed => publishMainStream(followee.id, 'receiveFollowRequest', packed));
|
||||
|
||||
Users.pack(followee.id, followee, {
|
||||
detail: true
|
||||
detail: true,
|
||||
}).then(packed => publishMainStream(followee.id, 'meUpdated', packed));
|
||||
|
||||
// 通知を作成
|
||||
createNotification(followee.id, 'receiveFollowRequest', {
|
||||
notifierId: follower.id,
|
||||
followRequestId: followRequest.id
|
||||
followRequestId: followRequest.id,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user