mirror of
				https://github.com/binwiederhier/ntfy.git
				synced 2025-10-31 04:52:23 +01:00 
			
		
		
		
	Increase FCM priority for ntfy priority high and max, closes #70
This commit is contained in:
		
							parent
							
								
									09515f26df
								
							
						
					
					
						commit
						722c579db0
					
				
					 1 changed files with 9 additions and 2 deletions
				
			
		|  | @ -213,9 +213,16 @@ func createFirebaseSubscriber(conf *Config) (subscriber, error) { | ||||||
| 				"message":  m.Message, | 				"message":  m.Message, | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  | 		var androidConfig *messaging.AndroidConfig | ||||||
|  | 		if m.Priority >= 4 { | ||||||
|  | 			androidConfig = &messaging.AndroidConfig{ | ||||||
|  | 				Priority: "high", | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
| 		_, err := msg.Send(context.Background(), &messaging.Message{ | 		_, err := msg.Send(context.Background(), &messaging.Message{ | ||||||
| 			Topic: m.Topic, | 			Topic:   m.Topic, | ||||||
| 			Data:  data, | 			Data:    data, | ||||||
|  | 			Android: androidConfig, | ||||||
| 		}) | 		}) | ||||||
| 		return err | 		return err | ||||||
| 	}, nil | 	}, nil | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Philipp Heckel
						Philipp Heckel