www.fgks.org   »   [go: up one dir, main page]

Skip to content

Commit

Permalink
Merge pull request #60 from batbayar-su/chore_update_send_notificatio…
Browse files Browse the repository at this point in the history
…n_to_topic_example

chore: update send notification to topic example
  • Loading branch information
sabman committed May 25, 2020
2 parents 390decb + ada60f1 commit fcf66dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ FCM [topic messaging](https://firebase.google.com/docs/cloud-messaging/topic-mes

```ruby
response = fcm.send_with_notification_key("/topics/yourTopic",
data: {message: "This is a FCM Topic Message!"})
notification: {body: "This is a FCM Topic Message!"})
```

Or you can use the helper:

```ruby
response = fcm.send_to_topic("yourTopic",
data: {message: "This is a FCM Topic Message!"})
notification: {body: "This is a FCM Topic Message!"})
```

### Sending to Multiple Topics
Expand Down Expand Up @@ -137,8 +137,8 @@ The `send_to_topic_condition` method within this library allows you to specicy a
```ruby
response = fcm.send_to_topic_condition(
"'TopicA' in topics && ('TopicB' in topics || 'TopicC' in topics)",
data: {
message: "This is an FCM Topic Message sent to a condition!"
notification: {
body: "This is an FCM Topic Message sent to a condition!"
}
)
```
Expand Down

0 comments on commit fcf66dc

Please sign in to comment.