summaryrefslogtreecommitdiff
path: root/internal/federation/dereferencing/account.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/federation/dereferencing/account.go')
-rw-r--r--internal/federation/dereferencing/account.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/federation/dereferencing/account.go b/internal/federation/dereferencing/account.go
index d51d3078e..86ea9b7fd 100644
--- a/internal/federation/dereferencing/account.go
+++ b/internal/federation/dereferencing/account.go
@@ -37,6 +37,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/log"
"github.com/superseriousbusiness/gotosocial/internal/media"
"github.com/superseriousbusiness/gotosocial/internal/transport"
+ "github.com/superseriousbusiness/gotosocial/internal/util"
)
// accountUpToDate returns whether the given account model is both updateable (i.e.
@@ -384,7 +385,7 @@ func (d *Dereferencer) enrichAccountSafely(
// to safely defer in case of panic, while still
// performing more granular unlocks when needed.
unlock := d.state.FedLocks.Lock(uriStr)
- unlock = doOnce(unlock)
+ unlock = util.DoOnce(unlock)
defer unlock()
// Perform status enrichment with passed vars.
@@ -735,7 +736,7 @@ func (d *Dereferencer) fetchRemoteAccountAvatar(ctx context.Context, tsport tran
// Acquire lock for derefs map.
unlock := d.state.FedLocks.Lock(latestAcc.AvatarRemoteURL)
- unlock = doOnce(unlock)
+ unlock = util.DoOnce(unlock)
defer unlock()
// Look for an existing dereference in progress.
@@ -821,7 +822,7 @@ func (d *Dereferencer) fetchRemoteAccountHeader(ctx context.Context, tsport tran
// Acquire lock for derefs map.
unlock := d.state.FedLocks.Lock(latestAcc.HeaderRemoteURL)
- unlock = doOnce(unlock)
+ unlock = util.DoOnce(unlock)
defer unlock()
// Look for an existing dereference in progress.