From c33df7e3665a03085dace841dc2de4a6a5f57ddd Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Sat, 2 Mar 2019 00:55:49 -0500 Subject: [PATCH] don't show crossposter label when it's a bot --- .../stream/status/status.component.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/app/components/stream/status/status.component.ts b/src/app/components/stream/status/status.component.ts index 0f42bf0d..6cfbcf2b 100644 --- a/src/app/components/stream/status/status.component.ts +++ b/src/app/components/stream/status/status.component.ts @@ -30,7 +30,7 @@ export class StatusComponent implements OnInit { @Input('statusWrapper') set statusWrapper(value: StatusWrapper) { this._statusWrapper = value; - this.status = value.status; + this.status = value.status; if (this.status.reblog) { this.reblog = true; @@ -38,7 +38,7 @@ export class StatusComponent implements OnInit { } else { this.displayedStatus = this.status; } - + this.checkLabels(this.displayedStatus); this.checkContentWarning(this.displayedStatus); @@ -78,14 +78,16 @@ export class StatusComponent implements OnInit { private checkLabels(status: Status) { //since API is limited with federated status... - if (status.uri.includes('birdsite.link')) { - this.isCrossPoster = true; - } - else if (status.application) { - const usedApp = status.application.name.toLowerCase(); - if (usedApp && (usedApp.includes('moa') || usedApp.includes('birdsite') || usedApp.includes('twitter'))) { + if (!status.account.bot) { + if (status.uri.includes('birdsite.link')) { this.isCrossPoster = true; } + else if (status.application) { + const usedApp = status.application.name.toLowerCase(); + if (usedApp && (usedApp.includes('moa') || usedApp.includes('birdsite') || usedApp.includes('twitter'))) { + this.isCrossPoster = true; + } + } } if (status.in_reply_to_account_id && status.in_reply_to_account_id === status.account.id) {