mirror of
https://github.com/NicolasConstant/sengi
synced 2024-12-22 13:54:10 +01:00
Improve status lookup from search
This commit is contained in:
parent
822ef21985
commit
fc7d8c35ab
@ -167,8 +167,8 @@ export class ThreadComponent extends BrowseBase {
|
||||
return this.mastodonService.search(currentAccount, status.uri, version, true);
|
||||
})
|
||||
.then((result: Results) => {
|
||||
if (result.statuses.length === 1) {
|
||||
const retrievedStatus = result.statuses[0];
|
||||
const retrievedStatus = result.statuses.find(({ uri }) => uri === status.uri);
|
||||
if (retrievedStatus) {
|
||||
return retrievedStatus;
|
||||
}
|
||||
throw new Error('could not find status');
|
||||
|
Loading…
Reference in New Issue
Block a user