summaryrefslogtreecommitdiff
path: root/internal/processing/account
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/account')
-rw-r--r--internal/processing/account/createblock.go5
-rw-r--r--internal/processing/account/get.go11
2 files changed, 4 insertions, 12 deletions
diff --git a/internal/processing/account/createblock.go b/internal/processing/account/createblock.go
index d2a2bab94..68f28fafe 100644
--- a/internal/processing/account/createblock.go
+++ b/internal/processing/account/createblock.go
@@ -53,10 +53,7 @@ func (p *processor) BlockCreate(ctx context.Context, requestingAccount *gtsmodel
// make the block
block := &gtsmodel.Block{}
- newBlockID, err := id.NewULID()
- if err != nil {
- return nil, gtserror.NewErrorInternalError(err)
- }
+ newBlockID := id.NewULID()
block.ID = newBlockID
block.AccountID = requestingAccount.ID
block.Account = requestingAccount
diff --git a/internal/processing/account/get.go b/internal/processing/account/get.go
index 6c134547e..0592555da 100644
--- a/internal/processing/account/get.go
+++ b/internal/processing/account/get.go
@@ -26,7 +26,6 @@ import (
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/db"
- "github.com/superseriousbusiness/gotosocial/internal/federation/dereferencing"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/transport"
@@ -94,13 +93,9 @@ func (p *processor) getAccountFor(ctx context.Context, requestingAccount *gtsmod
return nil, gtserror.NewErrorInternalError(fmt.Errorf("error parsing url %s: %s", targetAccount.URI, err))
}
- a, err := p.federator.GetAccount(transport.WithFastfail(ctx), dereferencing.GetAccountParams{
- RequestingUsername: requestingAccount.Username,
- RemoteAccountID: targetAccountURI,
- RemoteAccountHost: targetAccount.Domain,
- RemoteAccountUsername: targetAccount.Username,
- Blocking: true,
- })
+ a, err := p.federator.GetAccountByURI(
+ transport.WithFastfail(ctx), requestingAccount.Username, targetAccountURI, true,
+ )
if err == nil {
targetAccount = a
}