mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-11 08:03:09 -06:00
Fix typo
This commit is contained in:
parent
0e9e499252
commit
bb262a3b15
|
|
@ -75,14 +75,14 @@ func (r *notificationDataStatements) UpsertRoomUnreadCounts(ctx context.Context,
|
|||
return
|
||||
}
|
||||
|
||||
func (r *notificationDataStatements) SelectUnserUnreadCountsForRooms(
|
||||
func (r *notificationDataStatements) SelectUserUnreadCountsForRooms(
|
||||
ctx context.Context, txn *sql.Tx, userID string, roomIDs []string,
|
||||
) (map[string]*eventutil.NotificationData, error) {
|
||||
rows, err := sqlutil.TxStmt(txn, r.selectUserUnreadCountsForRooms).QueryContext(ctx, userID, pq.Array(roomIDs))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer internal.CloseAndLogIfError(ctx, rows, "SelectUnserUnreadCountsForRooms: rows.close() failed")
|
||||
defer internal.CloseAndLogIfError(ctx, rows, "SelectUserUnreadCountsForRooms: rows.close() failed")
|
||||
|
||||
roomCounts := map[string]*eventutil.NotificationData{}
|
||||
var roomID string
|
||||
|
|
|
|||
|
|
@ -1044,7 +1044,7 @@ func (d *Database) GetUserUnreadNotificationCountsForRooms(ctx context.Context,
|
|||
}
|
||||
roomIDs = append(roomIDs, roomID)
|
||||
}
|
||||
return d.NotificationData.SelectUnserUnreadCountsForRooms(ctx, nil, userID, roomIDs)
|
||||
return d.NotificationData.SelectUserUnreadCountsForRooms(ctx, nil, userID, roomIDs)
|
||||
}
|
||||
|
||||
func (d *Database) SelectContextEvent(ctx context.Context, roomID, eventID string) (int, gomatrixserverlib.HeaderedEvent, error) {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ func (r *notificationDataStatements) UpsertRoomUnreadCounts(ctx context.Context,
|
|||
return
|
||||
}
|
||||
|
||||
func (r *notificationDataStatements) SelectUnserUnreadCountsForRooms(
|
||||
func (r *notificationDataStatements) SelectUserUnreadCountsForRooms(
|
||||
ctx context.Context, txn *sql.Tx, userID string, roomIDs []string,
|
||||
) (map[string]*eventutil.NotificationData, error) {
|
||||
params := make([]interface{}, len(roomIDs)+1)
|
||||
|
|
@ -95,7 +95,7 @@ func (r *notificationDataStatements) SelectUnserUnreadCountsForRooms(
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer internal.CloseAndLogIfError(ctx, rows, "SelectUnserUnreadCountsForRooms: rows.close() failed")
|
||||
defer internal.CloseAndLogIfError(ctx, rows, "SelectUserUnreadCountsForRooms: rows.close() failed")
|
||||
|
||||
roomCounts := map[string]*eventutil.NotificationData{}
|
||||
var roomID string
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ type Memberships interface {
|
|||
|
||||
type NotificationData interface {
|
||||
UpsertRoomUnreadCounts(ctx context.Context, txn *sql.Tx, userID, roomID string, notificationCount, highlightCount int) (types.StreamPosition, error)
|
||||
SelectUnserUnreadCountsForRooms(ctx context.Context, txn *sql.Tx, userID string, roomIDs []string) (map[string]*eventutil.NotificationData, error)
|
||||
SelectUserUnreadCountsForRooms(ctx context.Context, txn *sql.Tx, userID string, roomIDs []string) (map[string]*eventutil.NotificationData, error)
|
||||
SelectMaxID(ctx context.Context, txn *sql.Tx) (int64, error)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue