Send Update activity
This commit is contained in:
parent
3efffbcf22
commit
57a63d38aa
3 changed files with 56 additions and 0 deletions
14
src/remote/activitypub/renderer/update.ts
Normal file
14
src/remote/activitypub/renderer/update.ts
Normal file
|
|
@ -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;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue