diff options
| author | mei23 <m@m544.net> | 2018-09-01 20:17:30 +0900 |
|---|---|---|
| committer | mei23 <m@m544.net> | 2018-09-01 20:23:01 +0900 |
| commit | 57a63d38aaae33331c0272cbcbc3f5d254cfd93d (patch) | |
| tree | d46e619743c4a3710855afd2df978565143ef4b1 /src/remote | |
| parent | Receive Update activity (diff) | |
| download | sharkey-57a63d38aaae33331c0272cbcbc3f5d254cfd93d.tar.gz sharkey-57a63d38aaae33331c0272cbcbc3f5d254cfd93d.tar.bz2 sharkey-57a63d38aaae33331c0272cbcbc3f5d254cfd93d.zip | |
Send Update activity
Diffstat (limited to 'src/remote')
| -rw-r--r-- | src/remote/activitypub/renderer/update.ts | 14 |
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; +}; |