1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-11-22 19:33:27 +01:00

Increase FCM priority for ntfy priority high and max, closes #70

This commit is contained in:
Philipp Heckel 2022-01-04 19:59:54 +01:00
parent 09515f26df
commit 722c579db0

View file

@ -213,9 +213,16 @@ func createFirebaseSubscriber(conf *Config) (subscriber, error) {
"message": m.Message,
}
}
var androidConfig *messaging.AndroidConfig
if m.Priority >= 4 {
androidConfig = &messaging.AndroidConfig{
Priority: "high",
}
}
_, err := msg.Send(context.Background(), &messaging.Message{
Topic: m.Topic,
Data: data,
Topic: m.Topic,
Data: data,
Android: androidConfig,
})
return err
}, nil