diff options
Diffstat (limited to 'src/remote/activitypub/renderer/create.ts')
| -rw-r--r-- | src/remote/activitypub/renderer/create.ts | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/remote/activitypub/renderer/create.ts b/src/remote/activitypub/renderer/create.ts index b8bf98a655..42b36195ff 100644 --- a/src/remote/activitypub/renderer/create.ts +++ b/src/remote/activitypub/renderer/create.ts @@ -1,4 +1,12 @@ -export default (object: any) => ({ - type: 'Create', - object -}); +import config from '../../../config'; +import { INote } from '../../../models/note'; + +export default (object: any, note: INote) => { + return { + id: `${config.url}/notes/${note._id}/activity`, + actor: `${config.url}/users/${note.userId}`, + type: 'Create', + published: note.createdAt.toISOString(), + object + }; +}; |