parent
037837b551
commit
0e4a111f81
1714 changed files with 20803 additions and 11751 deletions
15
packages/backend/src/remote/activitypub/renderer/update.ts
Normal file
15
packages/backend/src/remote/activitypub/renderer/update.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import config from '@/config/index';
|
||||
import { User } from '@/models/entities/user';
|
||||
|
||||
export default (object: any, user: { id: User['id'] }) => {
|
||||
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,
|
||||
published: new Date().toISOString(),
|
||||
} as any;
|
||||
|
||||
return activity;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue