better acct on remote status and rely now on uri

This commit is contained in:
Nicolas Constant 2020-04-06 23:06:10 -04:00
parent f8868f1fed
commit a98048b4fd
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 6 additions and 2 deletions

View File

@ -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;