From 0b14266ff165c58e568fa81d22d07081c454ca58 Mon Sep 17 00:00:00 2001 From: marclucraft Date: Fri, 26 Jun 2026 15:40:55 +0100 Subject: [PATCH] Generate web_push_topic from $content (the post title). Currently $segment is used. Each post will now have its own unique topic, so notifications for different posts won't override each other. --- v3/onesignal-notification.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v3/onesignal-notification.php b/v3/onesignal-notification.php index 1eef7aa..4032484 100644 --- a/v3/onesignal-notification.php +++ b/v3/onesignal-notification.php @@ -71,7 +71,7 @@ function onesignal_create_notification($post, $notification_options = array()) 'headings' => array('en' => $title), 'contents' => array('en' => $excerpt), 'included_segments' => array($segment), - 'web_push_topic' => str_replace(' ', '-', strtolower($segment)), + 'web_push_topic' => str_replace(' ', '-', strtolower($content)), 'isAnyWeb' => true, )), );