diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-18 14:09:55 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-18 14:09:55 +0900 |
| commit | 233e1eeeb220cdc37fcc6192f19550b353c464fb (patch) | |
| tree | b0c73bb96cbe8f5d741e56c8b901a596d84ad949 /src/remote/activitypub/kernel/like.ts | |
| parent | Clean up (diff) | |
| download | sharkey-233e1eeeb220cdc37fcc6192f19550b353c464fb.tar.gz sharkey-233e1eeeb220cdc37fcc6192f19550b353c464fb.tar.bz2 sharkey-233e1eeeb220cdc37fcc6192f19550b353c464fb.zip | |
Fix bug
Diffstat (limited to 'src/remote/activitypub/kernel/like.ts')
| -rw-r--r-- | src/remote/activitypub/kernel/like.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/remote/activitypub/kernel/like.ts b/src/remote/activitypub/kernel/like.ts index 4941608588..fc5d0a2f61 100644 --- a/src/remote/activitypub/kernel/like.ts +++ b/src/remote/activitypub/kernel/like.ts @@ -1,3 +1,4 @@ +import * as mongo from 'mongodb'; import Note from '../../../models/note'; import { IRemoteUser } from '../../../models/user'; import { ILike } from '../type'; @@ -9,7 +10,7 @@ export default async (actor: IRemoteUser, activity: ILike) => { // Transform: // https://misskey.ex/notes/xxxx to // xxxx - const noteId = id.split('/').pop(); + const noteId = new mongo.ObjectID(id.split('/').pop()); const note = await Note.findOne({ _id: noteId }); if (note === null) { |