Discourse Mobile Push — FCM push notifications for mobile apps

AI-generated summary

Michael_Sandler introduces a new Discourse plugin, discourse-mobile-push, designed to send Firebase Cloud Messaging (FCM) push notifications to native Android and iOS applications. The author developed this plugin from scratch because the existing discourse-fcm-notifications plugin is outdated and causes warnings on current Discourse installations. The new plugin serves as the delivery layer, leveraging Discourse’s native notification system while offering features such as multiple device registration, deep linking to topics or chats, automatic token cleanup, and optional privacy modes. It is MIT licensed and was partly developed with AI assistance.

In subsequent posts, Michael_Sandler notes that he has implemented the plugin in a Flutter wrapper app for Android, though iOS support is not yet complete. NateDhaliwal suggests requesting inclusion in the @plugin_authors group to allow posting in the #customization:plugin category. forumcopilot shares their experience with a different approach using a Flutter app that implements push notifications without a plugin, though with slight delays. They express interest in potentially adopting Michael_Sandler’s implementation once it gains more traction and invite feedback on their own open-source app project.

I built a new Discourse plugin for sending push notifications to native Android/iOS apps using Firebase Cloud Messaging (FCM).

Why?

The existing discourse-fcm-notifications plugin provides similar functionality, but it is no longer up to date with current Discourse. Installing it on a current Discourse installation produces warnings.

I had trouble getting the old plugin to work on other testers devices. Rather than trying to update it, I decided to build a new implementation from scratch.

Features

  • FCM push notifications for native mobile apps
  • Multiple devices per user
  • Device registration and removal through an API
  • Deep links to the relevant Discourse topic, post or chat
  • Automatic removal of invalid/expired FCM tokens
  • Retry handling for temporary Firebase failures
  • Optional privacy mode with generic notification content
  • Admin diagnostics and test-notification tools
  • Uses Discourse’s existing notification system and preferences

The plugin is intended to provide the delivery layer between Discourse and a native mobile app; Discourse remains responsible for deciding which notifications a user receives.

AI-assisted development

A significant part of this plugin was developed with the assistance of AI. I am posting it here partly to get feedback from experienced Discourse developers and to identify anything that should be changed or improved.

It is MIT licensed.

Feedback, bug reports and suggestions are welcome.

2 Likes

I am happy to share how I have implemented it in my Flutter wrapper app for my Discourse forum. I haven’t done Apple yet, only Android.

1 Like

You might want to request to be in @plugin_authors so that you can out this in Customization > Plugin .

2 Likes

@Michael_Sandler great work. I also work on a Flutter app for Discourse and have just launched it. I implemented Push Notification slightly different from what you did and it requires no plugin installation, although not instant.

I think I will go down to your path once there are many users using it.

Take a look and I appreciate feedback and maybe I can use your implementation too.