Skip to content

Commit

Permalink
Only send Firebase data messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Heckel committed Oct 29, 2021
1 parent 4b455e0 commit 9a91312
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,14 @@ func createFirebaseSubscriber(conf *config.Config) (subscriber, error) {
}
return func(m *message) error {
_, err := msg.Send(context.Background(), &messaging.Message{
Topic: m.Topic,
Data: map[string]string{
"id": m.ID,
"time": fmt.Sprintf("%d", m.Time),
"event": m.Event,
"event": m.Event,
"topic": m.Topic,
"message": m.Message,
},
Notification: &messaging.Notification{
Title: m.Topic, // FIXME convert to ntfy.sh/$topic instead
Body: m.Message,
ImageURL: "",
},
Topic: m.Topic,
})
return err
}, nil
Expand Down

0 comments on commit 9a91312

Please sign in to comment.