diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index fa0d6ab..1eed85a 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,7 @@
-
+
@@ -141,7 +141,6 @@
-
@@ -166,7 +165,8 @@
-
+
+
true
diff --git a/pkg/services/notifications.go b/pkg/services/notifications.go
index 43c76b0..c9c65f6 100644
--- a/pkg/services/notifications.go
+++ b/pkg/services/notifications.go
@@ -58,19 +58,14 @@ func NewNotification(notification models.Notification) error {
}
func PushNotification(notification models.Notification) error {
- frontendAvailable := false
for conn := range wsConn[notification.RecipientID] {
- frontendAvailable = true
_ = conn.WriteMessage(1, models.UnifiedCommand{
Action: "notifications.new",
Payload: notification,
}.Marshal())
}
- // Skip push notification when frontend notify is available
- if frontendAvailable && !notification.IsForcePush {
- return nil
- }
+ // TODO Detect the push notification is turned off (still push when IsForcePush is on)
var subscribers []models.NotificationSubscriber
if err := database.C.Where(&models.NotificationSubscriber{