summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/kernel/undo/follow.ts
diff options
context:
space:
mode:
authorrinsuki <428rinsuki+git@gmail.com>2018-05-17 07:52:24 +0900
committerrinsuki <428rinsuki+git@gmail.com>2018-05-17 07:52:24 +0900
commit829b4012e6dc14eb64a3d8f60826fe9b6a41b40d (patch)
tree42ac37f323db349dca9316e6fdb39fc33b860686 /src/remote/activitypub/kernel/undo/follow.ts
parentadd yarn.lock to gitignore (diff)
parentUpdate deliver.ts (diff)
downloadmisskey-829b4012e6dc14eb64a3d8f60826fe9b6a41b40d.tar.gz
misskey-829b4012e6dc14eb64a3d8f60826fe9b6a41b40d.tar.bz2
misskey-829b4012e6dc14eb64a3d8f60826fe9b6a41b40d.zip
Merge branch 'master' into fix/yarn-lock-ignore
Diffstat (limited to 'src/remote/activitypub/kernel/undo/follow.ts')
-rw-r--r--src/remote/activitypub/kernel/undo/follow.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/remote/activitypub/kernel/undo/follow.ts b/src/remote/activitypub/kernel/undo/follow.ts
index a85cb0305d..c0b10c1898 100644
--- a/src/remote/activitypub/kernel/undo/follow.ts
+++ b/src/remote/activitypub/kernel/undo/follow.ts
@@ -1,3 +1,4 @@
+import * as mongo from 'mongodb';
import User, { IRemoteUser } from '../../../../models/user';
import config from '../../../../config';
import unfollow from '../../../../services/following/delete';
@@ -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');