mirror of
https://github.com/NicolasConstant/sengi
synced 2024-12-22 13:54:10 +01:00
Merge pull request #648 from alexgleason/status-fix
Improve status lookup from search
This commit is contained in:
commit
ec27b307d0
@ -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