mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 14:52:26 -05:00
[feature] serdes for moved/also_known_as (#2600)
* [feature] serdes for moved/also_known_as * document `alsoKnownAs` and `movedTo` properties * only implicitly populate AKA uris from DB for local accounts * don't let remotes store more than 20 AKA uris to avoid shenanigans
This commit is contained in:
parent
3cc51d5072
commit
aa396c78d3
11 changed files with 392 additions and 22 deletions
|
|
@ -279,7 +279,12 @@ func (a *accountDB) PopulateAccount(ctx context.Context, account *gtsmodel.Accou
|
|||
}
|
||||
}
|
||||
|
||||
if !account.AlsoKnownAsPopulated() {
|
||||
// Only try to populate AlsoKnownAs for local accounts,
|
||||
// since those are the only accounts to which it's relevant.
|
||||
//
|
||||
// AKA from remotes might have loads of random-ass values
|
||||
// set here, and we don't want to do lots of failing DB calls.
|
||||
if account.IsLocal() && !account.AlsoKnownAsPopulated() {
|
||||
// Account alsoKnownAs accounts are
|
||||
// out-of-date with URIs, repopulate.
|
||||
alsoKnownAs := make([]*gtsmodel.Account, 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue