From 57a63d38aaae33331c0272cbcbc3f5d254cfd93d Mon Sep 17 00:00:00 2001 From: mei23 Date: Sat, 1 Sep 2018 20:17:30 +0900 Subject: Send Update activity --- src/remote/activitypub/renderer/update.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/remote/activitypub/renderer/update.ts (limited to 'src/remote/activitypub') diff --git a/src/remote/activitypub/renderer/update.ts b/src/remote/activitypub/renderer/update.ts new file mode 100644 index 0000000000..cf9acc9acb --- /dev/null +++ b/src/remote/activitypub/renderer/update.ts @@ -0,0 +1,14 @@ +import config from '../../../config'; +import { ILocalUser } from '../../../models/user'; + +export default (object: any, user: ILocalUser) => { + const activity = { + id: `${config.url}/users/${user._id}#updates/${new Date().getTime()}`, + actor: `${config.url}/users/${user._id}`, + type: 'Update', + to: [ 'https://www.w3.org/ns/activitystreams#Public' ], + object + } as any; + + return activity; +}; -- cgit v1.2.3-freya