Commit c311c1d0 authored by Simon Esposito's avatar Simon Esposito
Browse files

Improve notification storage

parent 19e1063b
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ func NotificationSend(ctx context.Context, logger *zap.Logger, db *sql.DB, messa
	}

	// Deliver live notifications to connected users.
	go func() {
		for userID, ns := range notifications {
			messageRouter.SendToStream(logger, PresenceStream{Mode: StreamModeNotifications, Subject: userID}, &rtapi.Envelope{
				Message: &rtapi.Envelope_Notifications{
@@ -79,6 +80,7 @@ func NotificationSend(ctx context.Context, logger *zap.Logger, db *sql.DB, messa
				},
			}, true)
		}
	}()

	return nil
}