使用 OneSignal 的白名单 Discourse 应用推送通知

Could you at least say which dependency needs updating, or better yet, submit a PR with the fix?

8 个赞

Sure, our developer at Quemuse submitted a PR:
https://github.com/pmusaraj/discourse-mobile-single-site-app/pull/20

4 个赞

How did you get notifications to work for everyone who downloads the app?

If a user hasn’t signed up yet (which is gonna be 99% of people), they’re gonna skip the prompt, sign up, and won’t receive notifications because they didn’t login with the prompt.

Also, for people who skip the prompt and sign in through the header button, they won’t get notifications either.

Notifications only work on iOS when the person signs in through the login prompt when you first download it. Also, there is no signup link on the login prompt for me.

The app only receives notifications if the user does not skip the prompt. You could delay the prompt until later, but this hasn’t been an issue with real users.

I don’t mean the native prompt that says “Would you like X to send you notifications? Accept or Decline”. I mean the login splash screen that is displayed within the initial installation of the app.

Ah, there should be a “Connect” button. It shows up only after they have logged in, as anon there are no notifications.

1 个赞

Right, my concern is that a new person trying out the app for the first time skips the login splash screen (since they don’t have an account), after using the forum for some time, they decide to create an account. They do so, but now they won’t receive notifications because they didn’t login back when they installed the app.

Currently, we use a disclaimer text in the splash screen to help users understand.

Hi, I was able to install onesignal on my whitelabeled app but the notification are only showed when I open the app. Is there a config I am missing?

Thx!

F.

1 个赞

That seems to indicate that push notifications aren’t configured correctly. Did you build the app with the same PN certificate as what you added to the OneSignal account?

3 个赞

All is working using the discourse plugin. I want to implement a separate push mechanism using onesignal API but I dont know where Discourse is storing Onesignal reference to the user id or the way around.

From the discourse onesignal plugin it seems that the call is made via username ( https://github.com/pmusaraj/discourse-onesignal/blob/master/plugin.rb line 46 ) but there are no tags on Onesignal.

I am curious, is OneSignal push notification still working with the latest iOS?

感谢 @pmusaraj 开发了这款出色的应用程序。我为我的论坛试用了它,因为我想要一个通知能正常工作的应用程序,而您的应用程序确实可以(在 Android 上测试过)!非常感谢。但是,在测试过程中我遇到了三个错误。

在小米设备上,应用程序的启动位置偏下。这条白色条带很碍眼。

:::

在三星设备上,当在设置中放大字体时,应用程序中的字体会变得非常大。某些元素将无法访问。


:::

最后,有一个肯定需要修复的错误。在应用程序中从 Discourse 注销后,您仍然会收到用户通知。在三星和小米设备上都出现了这种情况。

2024年还有人在用吗?

1 个赞

我希望在我的应用程序中为 Discourse(特别是聊天)设置 iOS 推送通知。

@pmusaraj - 上次提交是在 2023 年 1 月。这是否仍然有效?

然后,对于此线程中的其他人:是否有人实际使用此功能并且能够确认它仍然有效?

1 个赞

我怀疑照原样,这行不通。我好几年没在我的项目中使用过这个了,而且移动应用构建工具(无论好坏)变化很快,所以你可能甚至在本地运行它都会遇到麻烦。

1 个赞

感谢 @pmusaraj。假设我可以在我这边处理移动部分,你认为 discourse-onesigna 插件仍然可用吗?

如果不可用,我很想听听你关于如何获取通知事件并将其发送到其他地方的最佳方案。

我不确定。我怀疑它很快就会停止工作,因为它已经两年没有更新了,而且很有可能 OneSignal API 已经发生了变化。不过,欢迎您分叉并在此基础上进行构建!

2 个赞