aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing/notification.go
diff options
context:
space:
mode:
Diffstat (limited to 'clientapi/routing/notification.go')
-rw-r--r--clientapi/routing/notification.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/clientapi/routing/notification.go b/clientapi/routing/notification.go
index f593e27d..8ac12ce5 100644
--- a/clientapi/routing/notification.go
+++ b/clientapi/routing/notification.go
@@ -18,9 +18,9 @@ import (
"net/http"
"strconv"
- "github.com/matrix-org/dendrite/clientapi/jsonerror"
userapi "github.com/matrix-org/dendrite/userapi/api"
"github.com/matrix-org/gomatrixserverlib"
+ "github.com/matrix-org/gomatrixserverlib/spec"
"github.com/matrix-org/util"
)
@@ -35,7 +35,7 @@ func GetNotifications(
limit, err = strconv.ParseInt(limitStr, 10, 64)
if err != nil {
util.GetLogger(req.Context()).WithError(err).Error("ParseInt(limit) failed")
- return jsonerror.InternalServerError()
+ return spec.InternalServerError()
}
}
@@ -43,7 +43,7 @@ func GetNotifications(
localpart, domain, err := gomatrixserverlib.SplitID('@', device.UserID)
if err != nil {
util.GetLogger(req.Context()).WithError(err).Error("SplitID failed")
- return jsonerror.InternalServerError()
+ return spec.InternalServerError()
}
err = userAPI.QueryNotifications(req.Context(), &userapi.QueryNotificationsRequest{
Localpart: localpart,
@@ -54,7 +54,7 @@ func GetNotifications(
}, &queryRes)
if err != nil {
util.GetLogger(req.Context()).WithError(err).Error("QueryNotifications failed")
- return jsonerror.InternalServerError()
+ return spec.InternalServerError()
}
util.GetLogger(req.Context()).WithField("from", req.URL.Query().Get("from")).WithField("limit", limit).WithField("only", req.URL.Query().Get("only")).WithField("next", queryRes.NextToken).Infof("QueryNotifications: len %d", len(queryRes.Notifications))
return util.JSONResponse{