Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncheck "send notification on post publish" after post published and send_os_notif not called in notice.js #257

Closed
jfishman1 opened this issue Oct 29, 2020 · 1 comment · Fixed by #294

Comments

@jfishman1
Copy link

jfishman1 commented Oct 29, 2020

Description:

In the settings you can turn on or off the ability to "Automatically send a push notification when I create a post from the WordPress editor"

Screen Shot 2020-10-28 at 5 08 59 PM

If this is off, like in the image. When you go to publish a post, the checkbox to send the push is unchecked. You need to check it to send. - Correct behavior.

But when you check the box to send the push upon post publish the send_os_notif variable within notice.js is never triggered:

// is checked const send_os_notif = jQuery("[name=send_onesignal_notification]").attr( "checked" );

Therefore this code does not trigger:

// if hasn't started, change detected, box checked, and the status is 'publish' // this does not get called if the checkbox option is unchecked in the settings if (!state.started && post_modified && send_os_notif && is_published ) { console.log("here") state.interval = setInterval(get_metadata, 3000); // starts requests state.started = true; }

This was brought up when customer was trying to uncheck the "Send notification" checkbox after the post is published and still within the same post session.

@rgomezp
Copy link
Contributor

rgomezp commented May 25, 2022

To summarize, the problem is not that the notification doesn't send, but rather that the notification delivery data is not displayed in Gutenberg if the automatic send toggle isn't on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants