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

FCM/GCM: template parameters are not correctly replaced #7

Open
Krumelur opened this issue Apr 20, 2018 · 0 comments
Open

FCM/GCM: template parameters are not correctly replaced #7

Krumelur opened this issue Apr 20, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@Krumelur
Copy link

I'm using the Notification Hub client lib 1.0.9

I am registering a template like this:

{
 "notification"  :  {
    "title"  : "$(sender)",
    "body" : "$(message)"
  } 
}

When I send my templates message I populate the params dictionary with the keys sender and message and they will be replaced as expected and result in the following output:

{com.google.firebase.messaging.RemoteMessage$Notification@305d335}
	Body: "hallo2"
	Title: "Bulk message from backend"

Notice how body and title are correctly set.

Then I change my template to include additional text like below:

{
 "notification"  :  {
    "title"  : "$(sender)",
    "body" : "Some other text. $(message)"
  } 
}
		

and the result is:

{com.google.firebase.messaging.RemoteMessage$Notification@4c9d296}
	Body: "Some other text. $(message)"
	Title: "Bulk message from backend"

The message placeholder is not being replaced anymore. This is for FCM/GCM only and work fine for iOS templates.

@Alessar Alessar transferred this issue from Azure/azure-notificationhubs Mar 5, 2019
@marstr marstr added the bug Something isn't working label Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants