mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-21 20:15:10 +01:00
Fix moved account handling in IndexedDB feature (#6915)
* Fix stack overflow on importFetchedAccounts When the account has moved property, it should process destination account instead of source account itself. * Set account id instead of account object for moved property This restores "foo has moved to" indication on account view, and fixes `reblog` index on `accounts` object store.
This commit is contained in:
parent
3b2c7a33a9
commit
605a92b460
@ -39,7 +39,7 @@ export function importFetchedAccounts(accounts) {
|
|||||||
pushUnique(normalAccounts, normalizeAccount(account));
|
pushUnique(normalAccounts, normalizeAccount(account));
|
||||||
|
|
||||||
if (account.moved) {
|
if (account.moved) {
|
||||||
processAccount(account);
|
processAccount(account.moved);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,10 @@ export function normalizeAccount(account) {
|
|||||||
account.display_name_html = emojify(escapeTextContentForBrowser(displayName));
|
account.display_name_html = emojify(escapeTextContentForBrowser(displayName));
|
||||||
account.note_emojified = emojify(account.note);
|
account.note_emojified = emojify(account.note);
|
||||||
|
|
||||||
|
if (account.moved) {
|
||||||
|
account.moved = account.moved.id;
|
||||||
|
}
|
||||||
|
|
||||||
return account;
|
return account;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user