mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] tidy up media manager, add calling func to errors, build-script improvements (#1835)
* media manager tidy-up: de-interface and remove unused PostDataFunc Signed-off-by: kim <grufwub@gmail.com> * remove last traces of media.Manager being an interface Signed-off-by: kim <grufwub@gmail.com> * update error to provide caller, allow tuneable via build tags Signed-off-by: kim <grufwub@gmail.com> * remove kim-specific build script changes Signed-off-by: kim <grufwub@gmail.com> * fix merge conflicts Signed-off-by: kim <grufwub@gmail.com> * update build-script to support externally setting build variables Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
@@ -379,8 +379,8 @@ func (p *Processor) processUpdateAccountFromFederator(ctx context.Context, feder
|
||||
return errors.New("Accountable was not parseable on update account message")
|
||||
}
|
||||
|
||||
// Call RefreshAccount to fetch up-to-date bio, avatar, header, etc.
|
||||
updatedAccount, _, err := p.federator.RefreshAccount(
|
||||
// Fetch up-to-date bio, avatar, header, etc.
|
||||
_, _, err := p.federator.RefreshAccount(
|
||||
ctx,
|
||||
federatorMsg.ReceivingAccount.Username,
|
||||
incomingAccount,
|
||||
@@ -391,11 +391,6 @@ func (p *Processor) processUpdateAccountFromFederator(ctx context.Context, feder
|
||||
return fmt.Errorf("error enriching updated account from federator: %s", err)
|
||||
}
|
||||
|
||||
// RefreshAccount doesn't make DB update calls, so do that here.
|
||||
if err := p.state.DB.UpdateAccount(ctx, updatedAccount); err != nil {
|
||||
return fmt.Errorf("error enriching updated account from federator: %s", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user