summaryrefslogtreecommitdiffstats
path: root/models/notification.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/notification.go')
-rw-r--r--models/notification.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/models/notification.go b/models/notification.go
index 403c53243d..e7217a6e04 100644
--- a/models/notification.go
+++ b/models/notification.go
@@ -68,6 +68,7 @@ type Notification struct {
// FindNotificationOptions represent the filters for notifications. If an ID is 0 it will be ignored.
type FindNotificationOptions struct {
+ ListOptions
UserID int64
RepoID int64
IssueID int64
@@ -102,7 +103,7 @@ func (opts *FindNotificationOptions) ToCond() builder.Cond {
// ToSession will convert the given options to a xorm Session by using the conditions from ToCond and joining with issue table if required
func (opts *FindNotificationOptions) ToSession(e Engine) *xorm.Session {
- return e.Where(opts.ToCond())
+ return opts.setSessionPagination(e.Where(opts.ToCond()))
}
func getNotifications(e Engine, options FindNotificationOptions) (nl NotificationList, err error) {
@@ -132,7 +133,7 @@ func CreateOrUpdateIssueNotifications(issueID, commentID int64, notificationAuth
}
func createOrUpdateIssueNotifications(e Engine, issueID, commentID int64, notificationAuthorID int64) error {
- issueWatches, err := getIssueWatchers(e, issueID)
+ issueWatches, err := getIssueWatchers(e, issueID, ListOptions{})
if err != nil {
return err
}