mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 04:03:49 +01:00
Remove unnecessary checking
This commit is contained in:
parent
a7af657143
commit
1719d4133f
@ -10,7 +10,6 @@ import { getOriginalUrl } from '../../../misc/get-drive-file-url';
|
||||
import parseAcct from '../../../misc/acct/parse';
|
||||
import resolveUser from '../../../remote/resolve-user';
|
||||
import { downloadTextFile } from '../../../misc/download-text-file';
|
||||
import Following from '../../../models/following';
|
||||
|
||||
const logger = queueLogger.createSubLogger('import-following');
|
||||
|
||||
@ -46,14 +45,6 @@ export async function importFollowing(job: Bull.Job, done: any): Promise<void> {
|
||||
target = await resolveUser(username, host);
|
||||
}
|
||||
|
||||
// Check if already following
|
||||
const exist = await Following.findOne({
|
||||
followerId: user._id,
|
||||
followeeId: target._id
|
||||
});
|
||||
|
||||
if (exist) continue;
|
||||
|
||||
follow(user, target);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user