fix: derive web_push_topic from the post ID - #431
Merged
Conversation
sherwinski
reviewed
Jun 26, 2026
Contributor
Author
|
That makes sense. Better idea, yes 👍
…On Fri, 26 Jun 2026 at 18:28, Sherwin Heydarbeygi ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In v3/onesignal-notification.php
<#431 (comment)>
:
> @@ -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)),
Would it be better to just collapse on postID? What do you think?
—
Reply to this email directly, view it on GitHub
<#431?email_source=notifications&email_token=AAXCT7REOJUGZSFUI7VETZT5B2XFTA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTINJYGE2DCNBVGEY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#pullrequestreview-4581414511>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXCT7QUY3U3GZFLMNXB2CL5B2XFTAVCNFSNUABEKJSXA33TNF2G64TZHMZTKNRZG4ZTINR3JFZXG5LFHM2DONJSHA2DONRRGOQXMAQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
sherwinski
force-pushed
the
fix/web-push-topic-based-on-content
branch
from
July 2, 2026 18:50
0b14266 to
7e20162
Compare
sherwinski
force-pushed
the
fix/web-push-topic-based-on-content
branch
from
July 2, 2026 18:56
7e20162 to
122c0c8
Compare
sherwinski
approved these changes
Jul 2, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently
$segmentis used.Each post will now have its own unique topic, so notifications for different posts won't override each other.
Internal ticket