DEV Community

Cover image for FluffyChat push notification with sygnal!!

FluffyChat push notification with sygnal!!

Taher Fattahi on August 04, 2022

How you can add FluffyChat messenger to your custom application with your package name or your unique bundle id? FluffyChat source code => Link...
Collapse
 
robinwesterik profile image
Robin Westerik

Thanks Taher for sharing your findings. As it seems that FluffyChat's own push gateway hasn't been kept public, using the matrix reference gateway indeed seems like the way to go.

I'd like to add one thing however. In background_push.dart, FluffyChat seems to add a .data_message suffix to the app id. This could cause issues with sygnal not finding the right app id.

I fixed this by removing ".data_message" in FluffyChat's code, but adding .data_message to the app_id in the sygnal.yaml might work just as well.

Collapse
 
vinayak_dev01 profile image
vinayak dev

Are you mentioning SYGNAL as a matrix reference gateway? if so, can you provider any more resourse on how to set up?

Collapse
 
taherfattahi profile image
Taher Fattahi • Edited

yes, you can use sygnal as a push gateway for fluffychat or any matrix client platform but you need to set configurations and modify some sections of the source code so it's not easy for everyone.
anyway you can use this push gateway instead of sygnal
famedly-push-gateway

Thread Thread
 
vinayak_dev01 profile image
vinayak dev

Yeah.. Thanks for the quickie response. Actually, we are building our own Chat Application and we have tried famedly-push-gateway. When running the famedlyPushGateway.js file.. nothing happens and we don't know what we are missing and how to proceed then.. How can we make sure everything fits in place?

Thread Thread
 
taherfattahi profile image
Taher Fattahi

You need to set this variable in fluffychat:
static const String pushNotificationsGatewayUrl =

because synapse or any matrix home server needs to know about your push notification URL for sending notifications to the push gateway microservice

Image description

Thread Thread
 
vinayak_dev01 profile image
vinayak dev

Thanks, Taher.. Will Try That!

Collapse
 
vinayak_dev01 profile image
vinayak dev

Hey Taher... Can you please explain Step 2 on how to install and set up Sygnal? I have found this repo, but don't know how to configure.

Collapse
 
taherfattahi profile image
Taher Fattahi

If you want my recommendation I suggest you that use this service: gitlab.com/famedly/company/backend...

because Sygnal configuration and compatibility with fluffychat is not easy, you need to modify the source code of Sygnal besides of configuration

Collapse
 
taherfattahi profile image
Taher Fattahi

But anyway, you need to configure this file sygnal.yaml and put some keys for instance FCM keys on that

Collapse
 
vinayak_dev01 profile image
vinayak dev

Thanks, Taher!! It's working as expected.

Thread Thread
 
taherfattahi profile image
Taher Fattahi

you're welcome

Collapse
 
taherfattahi profile image
Taher Fattahi

and also configure and uncomment every line of that code base of your OS (android/ios) in sygnal.yaml file,