From a98048b4fd16cbf2c70cba7bbe7a3c1a618f8a66 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Mon, 6 Apr 2020 23:06:10 -0400 Subject: [PATCH] better acct on remote status and rely now on uri --- src/app/components/stream/thread/thread.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/components/stream/thread/thread.component.ts b/src/app/components/stream/thread/thread.component.ts index 4910b109..52d6e3c1 100644 --- a/src/app/components/stream/thread/thread.component.ts +++ b/src/app/components/stream/thread/thread.component.ts @@ -216,9 +216,13 @@ export class ThreadComponent implements OnInit, OnDestroy { let context = await this.mastodonService.getRemoteStatusContext(instance, id); let remoteStatuses = [...context.ancestors, ...context.descendants]; - let unknownStatuses = remoteStatuses.filter(x => !this.statuses.find(y => y.status.url == x.url)); + let unknownStatuses = remoteStatuses.filter(x => !this.statuses.find(y => y.status.uri == x.uri)); + + for(let s of unknownStatuses){ + if(!s.account.acct.includes('@')){ + s.account.acct += `@${instance}`; + } - for(let s of unknownStatuses){ let cwPolicy = this.toolsService.checkContentWarning(s); let wrapper = new StatusWrapper(s, null, cwPolicy.applyCw, cwPolicy.hide); wrapper.isRemote = true;