summaryrefslogtreecommitdiff
path: root/internal/processing/account/account.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-04-15 14:33:01 +0200
committerLibravatar GitHub <noreply@github.com>2022-04-15 14:33:01 +0200
commit26683b3d49beea9b1f0e8f78df4720285d4c0825 (patch)
tree06bf09cdee7a60c41947a0bd03d6a42ad83ee784 /internal/processing/account/account.go
parent[bugfix] Fix broken only_media and only_public flags on /api/v1/accounts/:id/... (diff)
downloadgotosocial-26683b3d49beea9b1f0e8f78df4720285d4c0825.tar.xz
[feature] Web profile pages for accounts (#449)
* add default avatars * allow webModule to error * return errWithCode from account get * add AccountGetLocalByUsername * check nil requesting account * add timestampShort function for just month/year * move loading logic to New + add default avatars * add profile page view * update swagger docs * add excludeReblogs to GetAccountStatuses * ignore casing when selecting local account by username * appropriate redirects * css fiddling * add 'about' heading * adjust thread page to work with routing * return AP representation if requested + authorized * simplify auth check * go fmt * golangci-lint ignore math/rand
Diffstat (limited to 'internal/processing/account/account.go')
-rw-r--r--internal/processing/account/account.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/processing/account/account.go b/internal/processing/account/account.go
index 1ef92cf85..2a9e5f898 100644
--- a/internal/processing/account/account.go
+++ b/internal/processing/account/account.go
@@ -47,12 +47,14 @@ type Processor interface {
// Unlike Delete, it will propagate the deletion out across the federating API to other instances.
DeleteLocal(ctx context.Context, account *gtsmodel.Account, form *apimodel.AccountDeleteRequest) gtserror.WithCode
// Get processes the given request for account information.
- Get(ctx context.Context, requestingAccount *gtsmodel.Account, targetAccountID string) (*apimodel.Account, error)
+ Get(ctx context.Context, requestingAccount *gtsmodel.Account, targetAccountID string) (*apimodel.Account, gtserror.WithCode)
+ // GetLocalByUsername processes the given request for account information targeting a local account by username.
+ GetLocalByUsername(ctx context.Context, requestingAccount *gtsmodel.Account, username string) (*apimodel.Account, gtserror.WithCode)
// Update processes the update of an account with the given form
Update(ctx context.Context, account *gtsmodel.Account, form *apimodel.UpdateCredentialsRequest) (*apimodel.Account, error)
// StatusesGet fetches a number of statuses (in time descending order) from the given account, filtered by visibility for
// the account given in authed.
- StatusesGet(ctx context.Context, requestingAccount *gtsmodel.Account, targetAccountID string, limit int, excludeReplies bool, maxID string, minID string, pinned bool, mediaOnly bool, publicOnly bool) ([]apimodel.Status, gtserror.WithCode)
+ StatusesGet(ctx context.Context, requestingAccount *gtsmodel.Account, targetAccountID string, limit int, excludeReplies bool, excludeReblogs bool, maxID string, minID string, pinned bool, mediaOnly bool, publicOnly bool) ([]apimodel.Status, gtserror.WithCode)
// FollowersGet fetches a list of the target account's followers.
FollowersGet(ctx context.Context, requestingAccount *gtsmodel.Account, targetAccountID string) ([]apimodel.Account, gtserror.WithCode)
// FollowingGet fetches a list of the accounts that target account is following.