aboutsummaryrefslogtreecommitdiff
path: root/userapi/util/notify.go
diff options
context:
space:
mode:
Diffstat (limited to 'userapi/util/notify.go')
-rw-r--r--userapi/util/notify.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/userapi/util/notify.go b/userapi/util/notify.go
index ff206bd3..fc0ab39b 100644
--- a/userapi/util/notify.go
+++ b/userapi/util/notify.go
@@ -8,6 +8,7 @@ import (
"github.com/matrix-org/dendrite/internal/pushgateway"
"github.com/matrix-org/dendrite/userapi/storage"
"github.com/matrix-org/dendrite/userapi/storage/tables"
+ "github.com/matrix-org/gomatrixserverlib"
log "github.com/sirupsen/logrus"
)
@@ -16,8 +17,8 @@ import (
// a single goroutine is started when talking to the Push
// gateways. There is no way to know when the background goroutine has
// finished.
-func NotifyUserCountsAsync(ctx context.Context, pgClient pushgateway.Client, localpart string, db storage.Database) error {
- pusherDevices, err := GetPushDevices(ctx, localpart, nil, db)
+func NotifyUserCountsAsync(ctx context.Context, pgClient pushgateway.Client, localpart string, serverName gomatrixserverlib.ServerName, db storage.Database) error {
+ pusherDevices, err := GetPushDevices(ctx, localpart, serverName, nil, db)
if err != nil {
return err
}
@@ -26,7 +27,7 @@ func NotifyUserCountsAsync(ctx context.Context, pgClient pushgateway.Client, loc
return nil
}
- userNumUnreadNotifs, err := db.GetNotificationCount(ctx, localpart, tables.AllNotifications)
+ userNumUnreadNotifs, err := db.GetNotificationCount(ctx, localpart, serverName, tables.AllNotifications)
if err != nil {
return err
}