diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2019-04-13 01:43:22 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-13 01:43:22 +0900 |
| commit | 987168b863c52d0548050ffbac569782bb9a8cef (patch) | |
| tree | c9aa2243dcdcbd044688d201a51c601574bff259 /src/remote/activitypub/kernel/undo/block.ts | |
| parent | Fix bug (diff) | |
| download | sharkey-987168b863c52d0548050ffbac569782bb9a8cef.tar.gz sharkey-987168b863c52d0548050ffbac569782bb9a8cef.tar.bz2 sharkey-987168b863c52d0548050ffbac569782bb9a8cef.zip | |
strictNullChecks (#4666)
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
Diffstat (limited to 'src/remote/activitypub/kernel/undo/block.ts')
| -rw-r--r-- | src/remote/activitypub/kernel/undo/block.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/remote/activitypub/kernel/undo/block.ts b/src/remote/activitypub/kernel/undo/block.ts index c916a00737..9c277ed7d2 100644 --- a/src/remote/activitypub/kernel/undo/block.ts +++ b/src/remote/activitypub/kernel/undo/block.ts @@ -9,13 +9,14 @@ const logger = apLogger; export default async (actor: IRemoteUser, activity: IBlock): Promise<void> => { const id = typeof activity.object == 'string' ? activity.object : activity.object.id; + if (id == null) throw 'missing id'; const uri = activity.id || activity; logger.info(`UnBlock: ${uri}`); if (!id.startsWith(config.url + '/')) { - return null; + return; } const blockee = await Users.findOne(id.split('/').pop()); |