feat: complete IM P0 and P1 reliability work
This commit is contained in:
@@ -70,6 +70,14 @@ func (Handler) Init(jsonconf json.RawMessage) (bool, error) {
|
||||
return false, errors.New("failed to parse config: " + err.Error())
|
||||
}
|
||||
|
||||
if raw := strings.TrimSpace(os.Getenv("IM_FCM_CREDENTIALS_JSON")); raw != "" {
|
||||
config.Credentials = json.RawMessage(raw)
|
||||
config.Enabled = true
|
||||
}
|
||||
if path := strings.TrimSpace(os.Getenv("IM_FCM_CREDENTIALS_FILE")); path != "" {
|
||||
config.CredentialsFile = path
|
||||
config.Enabled = true
|
||||
}
|
||||
if !config.Enabled {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user