monkeeShark/src/remote/activitypub/renderer/undo.ts
MeiMei b16c3798a4
Fix Announce/Delete AP deliver (#7517)
* Fix Announce/Delete AP deliver

* Revert "Fix Announce/Delete AP deliver"

This reverts commit 0292c5196df48f67bb7914e925560ba69e2b2980.

* localOnlyのDeleteをdeliverしないように

* null Activityに対するUndoはdeliverしないように
2021-05-19 16:15:01 +09:00

12 lines
278 B
TypeScript

import config from '@/config';
import { ILocalUser, User } from '../../../models/entities/user';
export default (object: any, user: { id: User['id'] }) => {
if (object == null) return null;
return {
type: 'Undo',
actor: `${config.url}/users/${user.id}`,
object
};
};