summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/renderer/update.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/remote/activitypub/renderer/update.ts')
-rw-r--r--src/remote/activitypub/renderer/update.ts14
1 files changed, 14 insertions, 0 deletions
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;
+};