1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-01 16:15:50 +02:00
This commit is contained in:
syuilo
2018-04-18 14:09:55 +09:00
parent 3519cb208e
commit 233e1eeeb2
3 changed files with 10 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
import * as mongo from 'mongodb';
import User, { IRemoteUser } from '../../../models/user';
import config from '../../../config';
import follow from '../../../services/following/create';
@@ -10,7 +11,9 @@ export default async (actor: IRemoteUser, activity: IFollow): Promise<void> => {
return null;
}
const followee = await User.findOne({ _id: id.split('/').pop() });
const followee = await User.findOne({
_id: new mongo.ObjectID(id.split('/').pop())
});
if (followee === null) {
throw new Error('followee not found');