wip: fix bug and remove unused property
This commit is contained in:
parent
fdde072614
commit
f7b954aead
|
@ -595,10 +595,10 @@ export class ApRendererService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public renderNoteUpdate(object: IPost, note: MiNote, user: { id: MiUser['id'] }): IUpdate {
|
public renderNoteUpdate(object: IPost, user: { id: MiUser['id'] }): IUpdate {
|
||||||
const activity: IUpdate = {
|
const activity: IUpdate = {
|
||||||
id: `${this.config.url}/users/${user.id}#updates/${new Date().getTime()}`,
|
id: `${this.config.url}/users/${user.id}#updates/${new Date().getTime()}`,
|
||||||
actor: this.userEntityService.genLocalUserUri(note.userId),
|
actor: this.userEntityService.genLocalUserUri(user.id),
|
||||||
type: 'Update',
|
type: 'Update',
|
||||||
published: new Date().toISOString(),
|
published: new Date().toISOString(),
|
||||||
object,
|
object,
|
||||||
|
|
|
@ -399,15 +399,15 @@ describe('ActivityPub', () => {
|
||||||
content: 'あ',
|
content: 'あ',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
resolver.register(actor.id, actor);
|
||||||
|
resolver.register(post.id, post);
|
||||||
|
|
||||||
const note = {
|
const note = {
|
||||||
...(await noteService.createNote(post.id, resolver, true))!,
|
...(await noteService.createNote(post.id, resolver, true))!,
|
||||||
updatedAt: new Date(),
|
updatedAt: new Date(),
|
||||||
};
|
};
|
||||||
|
|
||||||
resolver.register(actor.id, actor);
|
rendererService.renderNoteUpdate(await rendererService.renderNote(note, false, true), actor);
|
||||||
resolver.register(post.id, post);
|
|
||||||
|
|
||||||
rendererService.renderNoteUpdate(await rendererService.renderNote(note, false, true), note, actor);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue