summaryrefslogtreecommitdiff
path: root/internal/federation/dereferencing/account.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-08-20 12:26:56 +0200
committerLibravatar GitHub <noreply@github.com>2021-08-20 12:26:56 +0200
commit4920229a3b6e1d7dde536bc9ff766542b05d935c (patch)
treea9423beccec5331c372f01eedf38949dfb171e9e /internal/federation/dereferencing/account.go
parentText/status parsing fixes (#141) (diff)
downloadgotosocial-4920229a3b6e1d7dde536bc9ff766542b05d935c.tar.xz
Database updates (#144)
* start moving some database stuff around * continue moving db stuff around * more fiddling * more updates * and some more * and yet more * i broke SOMETHING but what, it's a mystery * tidy up * vendor ttlcache * use ttlcache * fix up some tests * rename some stuff * little reminder * some more updates
Diffstat (limited to 'internal/federation/dereferencing/account.go')
-rw-r--r--internal/federation/dereferencing/account.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/federation/dereferencing/account.go b/internal/federation/dereferencing/account.go
index 72d2e44d7..ba6766061 100644
--- a/internal/federation/dereferencing/account.go
+++ b/internal/federation/dereferencing/account.go
@@ -29,7 +29,6 @@ import (
"github.com/go-fed/activity/streams/vocab"
"github.com/sirupsen/logrus"
"github.com/superseriousbusiness/gotosocial/internal/ap"
- "github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/id"
"github.com/superseriousbusiness/gotosocial/internal/transport"
@@ -65,8 +64,8 @@ func (d *deref) GetRemoteAccount(username string, remoteAccountID *url.URL, refr
new := true
// check if we already have the account in our db
- maybeAccount := &gtsmodel.Account{}
- if err := d.db.GetWhere([]db.Where{{Key: "uri", Value: remoteAccountID.String()}}, maybeAccount); err == nil {
+ maybeAccount, err := d.db.GetAccountByURI(remoteAccountID.String())
+ if err == nil {
// we've seen this account before so it's not new
new = false
if !refresh {