1
0
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:
Nicolas Constant 2024-11-26 21:02:11 -05:00 committed by GitHub
commit ec27b307d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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