summaryrefslogtreecommitdiff
path: root/internal/api/activitypub/users/repliesget.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/activitypub/users/repliesget.go')
-rw-r--r--internal/api/activitypub/users/repliesget.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/api/activitypub/users/repliesget.go b/internal/api/activitypub/users/repliesget.go
index 3a8a81bfb..facbbcc85 100644
--- a/internal/api/activitypub/users/repliesget.go
+++ b/internal/api/activitypub/users/repliesget.go
@@ -91,15 +91,15 @@ import (
// description: not found
func (m *Module) StatusRepliesGETHandler(c *gin.Context) {
// usernames on our instance are always lowercase
- requestedUsername := strings.ToLower(c.Param(UsernameKey))
- if requestedUsername == "" {
+ requestedUser := strings.ToLower(c.Param(apiutil.UsernameKey))
+ if requestedUser == "" {
err := errors.New("no username specified in request")
apiutil.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGetV1)
return
}
// status IDs on our instance are always uppercase
- requestedStatusID := strings.ToUpper(c.Param(StatusIDKey))
+ requestedStatusID := strings.ToUpper(c.Param(apiutil.IDKey))
if requestedStatusID == "" {
err := errors.New("no status id specified in request")
apiutil.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGetV1)
@@ -114,7 +114,7 @@ func (m *Module) StatusRepliesGETHandler(c *gin.Context) {
if contentType == string(apiutil.TextHTML) {
// redirect to the status
- c.Redirect(http.StatusSeeOther, "/@"+requestedUsername+"/statuses/"+requestedStatusID)
+ c.Redirect(http.StatusSeeOther, "/@"+requestedUser+"/statuses/"+requestedStatusID)
return
}
@@ -150,7 +150,7 @@ func (m *Module) StatusRepliesGETHandler(c *gin.Context) {
// Fetch serialized status replies response for input status.
resp, errWithCode := m.processor.Fedi().StatusRepliesGet(
c.Request.Context(),
- requestedUsername,
+ requestedUser,
requestedStatusID,
page,
onlyOtherAccounts,