fix(backend/ApNoteService): try retrieving again when failed by duplication (#11472)
* fix(backend/ApNoteService): try retrieving again when failed by duplication * Update CHANGELOG.md --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
f6a3f6f5f1
commit
ec229dbd3b
3 changed files with 48 additions and 20 deletions
|
@ -259,6 +259,21 @@ describe('ActivityPub', () => {
|
|||
assert.strictEqual(note.text, 'test test foo');
|
||||
assert.strictEqual(note.uri, actor2Note.id);
|
||||
});
|
||||
|
||||
test('Fetch a note that is a featured note of the attributed actor', async () => {
|
||||
const actor = createRandomActor();
|
||||
actor.featured = `${actor.id}/collections/featured`;
|
||||
|
||||
const featured = createRandomFeaturedCollection(actor, 5);
|
||||
const firstNote = (featured.items as NonTransientIPost[])[0];
|
||||
|
||||
resolver.register(actor.id, actor);
|
||||
resolver.register(actor.featured, featured);
|
||||
resolver.register(firstNote.id, firstNote);
|
||||
|
||||
const note = await noteService.createNote(firstNote.id as string, resolver);
|
||||
assert.strictEqual(note?.uri, firstNote.id);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Images', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue