don't show crossposter label when it's a bot
This commit is contained in:
parent
e736ad8c08
commit
c33df7e366
|
@ -30,7 +30,7 @@ export class StatusComponent implements OnInit {
|
||||||
@Input('statusWrapper')
|
@Input('statusWrapper')
|
||||||
set statusWrapper(value: StatusWrapper) {
|
set statusWrapper(value: StatusWrapper) {
|
||||||
this._statusWrapper = value;
|
this._statusWrapper = value;
|
||||||
this.status = value.status;
|
this.status = value.status;
|
||||||
|
|
||||||
if (this.status.reblog) {
|
if (this.status.reblog) {
|
||||||
this.reblog = true;
|
this.reblog = true;
|
||||||
|
@ -38,7 +38,7 @@ export class StatusComponent implements OnInit {
|
||||||
} else {
|
} else {
|
||||||
this.displayedStatus = this.status;
|
this.displayedStatus = this.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.checkLabels(this.displayedStatus);
|
this.checkLabels(this.displayedStatus);
|
||||||
this.checkContentWarning(this.displayedStatus);
|
this.checkContentWarning(this.displayedStatus);
|
||||||
|
|
||||||
|
@ -78,14 +78,16 @@ export class StatusComponent implements OnInit {
|
||||||
|
|
||||||
private checkLabels(status: Status) {
|
private checkLabels(status: Status) {
|
||||||
//since API is limited with federated status...
|
//since API is limited with federated status...
|
||||||
if (status.uri.includes('birdsite.link')) {
|
if (!status.account.bot) {
|
||||||
this.isCrossPoster = true;
|
if (status.uri.includes('birdsite.link')) {
|
||||||
}
|
|
||||||
else if (status.application) {
|
|
||||||
const usedApp = status.application.name.toLowerCase();
|
|
||||||
if (usedApp && (usedApp.includes('moa') || usedApp.includes('birdsite') || usedApp.includes('twitter'))) {
|
|
||||||
this.isCrossPoster = true;
|
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) {
|
if (status.in_reply_to_account_id && status.in_reply_to_account_id === status.account.id) {
|
||||||
|
|
Loading…
Reference in New Issue