mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 04:12:26 -06:00
[bugfix] notification types missing from link header (#3571)
* ensure notification types get included in link header query for notifications * fix type query keys
This commit is contained in:
parent
c454b1b488
commit
a444adee97
6 changed files with 87 additions and 103 deletions
|
|
@ -28,6 +28,7 @@ import (
|
|||
"github.com/superseriousbusiness/gotosocial/internal/gtscontext"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/id"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/paging"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/util"
|
||||
)
|
||||
|
||||
|
|
@ -92,10 +93,11 @@ func (suite *NotificationTestSuite) TestGetAccountNotificationsWithSpam() {
|
|||
notifications, err := suite.db.GetAccountNotifications(
|
||||
gtscontext.SetBarebones(context.Background()),
|
||||
testAccount.ID,
|
||||
id.Highest,
|
||||
id.Lowest,
|
||||
"",
|
||||
20,
|
||||
&paging.Page{
|
||||
Min: paging.EitherMinID("", id.Lowest),
|
||||
Max: paging.MaxID(id.Highest),
|
||||
Limit: 20,
|
||||
},
|
||||
nil,
|
||||
nil,
|
||||
)
|
||||
|
|
@ -115,10 +117,11 @@ func (suite *NotificationTestSuite) TestGetAccountNotificationsWithoutSpam() {
|
|||
notifications, err := suite.db.GetAccountNotifications(
|
||||
gtscontext.SetBarebones(context.Background()),
|
||||
testAccount.ID,
|
||||
id.Highest,
|
||||
id.Lowest,
|
||||
"",
|
||||
20,
|
||||
&paging.Page{
|
||||
Min: paging.EitherMinID("", id.Lowest),
|
||||
Max: paging.MaxID(id.Highest),
|
||||
Limit: 20,
|
||||
},
|
||||
nil,
|
||||
nil,
|
||||
)
|
||||
|
|
@ -140,10 +143,11 @@ func (suite *NotificationTestSuite) TestDeleteNotificationsWithSpam() {
|
|||
notifications, err := suite.db.GetAccountNotifications(
|
||||
gtscontext.SetBarebones(context.Background()),
|
||||
testAccount.ID,
|
||||
id.Highest,
|
||||
id.Lowest,
|
||||
"",
|
||||
20,
|
||||
&paging.Page{
|
||||
Min: paging.EitherMinID("", id.Lowest),
|
||||
Max: paging.MaxID(id.Highest),
|
||||
Limit: 20,
|
||||
},
|
||||
nil,
|
||||
nil,
|
||||
)
|
||||
|
|
@ -161,10 +165,11 @@ func (suite *NotificationTestSuite) TestDeleteNotificationsWithSpam() {
|
|||
notifications, err = suite.db.GetAccountNotifications(
|
||||
gtscontext.SetBarebones(context.Background()),
|
||||
testAccount.ID,
|
||||
id.Highest,
|
||||
id.Lowest,
|
||||
"",
|
||||
20,
|
||||
&paging.Page{
|
||||
Min: paging.EitherMinID("", id.Lowest),
|
||||
Max: paging.MaxID(id.Highest),
|
||||
Limit: 20,
|
||||
},
|
||||
nil,
|
||||
nil,
|
||||
)
|
||||
|
|
@ -183,10 +188,11 @@ func (suite *NotificationTestSuite) TestDeleteNotificationsWithTwoAccounts() {
|
|||
notifications, err := suite.db.GetAccountNotifications(
|
||||
gtscontext.SetBarebones(context.Background()),
|
||||
testAccount.ID,
|
||||
id.Highest,
|
||||
id.Lowest,
|
||||
"",
|
||||
20,
|
||||
&paging.Page{
|
||||
Min: paging.EitherMinID("", id.Lowest),
|
||||
Max: paging.MaxID(id.Highest),
|
||||
Limit: 20,
|
||||
},
|
||||
nil,
|
||||
nil,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue