From 1c218ec314b80bd61c93c7ab9f12666f42e524a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Chr=C3=A1steck=C3=BD?= Date: Tue, 12 Sep 2023 10:52:51 +0200 Subject: [PATCH] Fix: Synchronization in endorsed mode includes current instance (#3) --- .../pages/synchronize-lemmy/synchronize-lemmy.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/censures/pages/synchronize-lemmy/synchronize-lemmy.component.ts b/src/app/censures/pages/synchronize-lemmy/synchronize-lemmy.component.ts index 2715a07..9ce4c71 100644 --- a/src/app/censures/pages/synchronize-lemmy/synchronize-lemmy.component.ts +++ b/src/app/censures/pages/synchronize-lemmy/synchronize-lemmy.component.ts @@ -146,7 +146,7 @@ export class SynchronizeLemmyComponent implements OnInit { } private async getEndorsedCensureChain(instance: string): Promise { - return await toPromise(this.fediseerApi.getEndorsementsByInstance([instance]).pipe( + const result = await toPromise(this.fediseerApi.getEndorsementsByInstance([instance]).pipe( map(response => { if (this.apiResponseHelper.handleErrors([response])) { return []; @@ -155,6 +155,10 @@ export class SynchronizeLemmyComponent implements OnInit { return response.successResponse!.instances.map(instance => instance.domain); }), )); + + result.push(instance); + + return result; } private async getCensuresByInstances(instances: string[]): Promise {