fix provider check for remote status
This commit is contained in:
parent
ce705f8c6b
commit
68dd97e5a9
|
@ -131,7 +131,7 @@ export class ThreadComponent implements OnInit, OnDestroy {
|
|||
if (status.visibility === 'public' || status.visibility === 'unlisted') {
|
||||
var statusPromise: Promise<Status> = Promise.resolve(status);
|
||||
|
||||
if (sourceAccount.id !== currentAccount.id) {
|
||||
if (!sourceAccount || sourceAccount.id !== currentAccount.id) {
|
||||
statusPromise = this.toolsService.getInstanceInfo(currentAccount)
|
||||
.then(instance => {
|
||||
let version: 'v1' | 'v2' = 'v1';
|
||||
|
@ -149,7 +149,7 @@ export class ThreadComponent implements OnInit, OnDestroy {
|
|||
|
||||
this.retrieveThread(currentAccount, statusPromise);
|
||||
|
||||
} else if (sourceAccount.id === currentAccount.id) {
|
||||
} else if (sourceAccount && sourceAccount.id === currentAccount.id) {
|
||||
var statusPromise = Promise.resolve(status);
|
||||
this.retrieveThread(currentAccount, statusPromise);
|
||||
} else {
|
||||
|
|
|
@ -205,7 +205,10 @@ export class ToolsService {
|
|||
}
|
||||
|
||||
getStatusUsableByAccount(account: AccountInfo, originalStatus: StatusWrapper): Promise<Status> {
|
||||
const isProvider = originalStatus.provider.id === account.id;
|
||||
let isProvider = false;
|
||||
if(!originalStatus.isRemote){
|
||||
isProvider = originalStatus.provider.id === account.id;
|
||||
}
|
||||
|
||||
let statusPromise: Promise<Status> = Promise.resolve(originalStatus.status);
|
||||
|
||||
|
|
Loading…
Reference in New Issue