diff options
Diffstat (limited to 'src/remote/activitypub/renderer/undo.ts')
| -rw-r--r-- | src/remote/activitypub/renderer/undo.ts | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/remote/activitypub/renderer/undo.ts b/src/remote/activitypub/renderer/undo.ts index 6f367415c4..627a6533ab 100644 --- a/src/remote/activitypub/renderer/undo.ts +++ b/src/remote/activitypub/renderer/undo.ts @@ -1,8 +1,12 @@ import config from '@/config'; import { ILocalUser, User } from '../../../models/entities/user'; -export default (object: any, user: { id: User['id'] }) => ({ - type: 'Undo', - actor: `${config.url}/users/${user.id}`, - object -}); +export default (object: any, user: { id: User['id'] }) => { + if (object == null) return null; + + return { + type: 'Undo', + actor: `${config.url}/users/${user.id}`, + object + }; +}; |