Open
Conversation
ff527c0 to
768bbf2
Compare
|
Hi! What's up with this change? |
|
Yeah, it would be good to have this change. The alternative is to setup 2 or more GoRush instances. |
|
Totally agreed to support multiple certs and multiple API keys. |
niveuseverto
suggested changes
Feb 21, 2018
niveuseverto
left a comment
There was a problem hiding this comment.
There one error in code, I marked it
| return nil, errors.New("APNS key_password not exists") | ||
| } | ||
| path = PushConf.Ios.KeyMap[key] | ||
| password = PushConf.Ios.KeyMap[key] |
There was a problem hiding this comment.
password = PushConf.Ios.KeyMap[key] needs to be changed to password = PushConf.Ios.KeyPass[key]
|
I would suggest intead of |
|
@appleboy Hey there |
slimus
reviewed
Feb 25, 2020
Contributor
slimus
left a comment
There was a problem hiding this comment.
I think empty key InitAPNSClient("") is bad idea.
| LogError.Errorf("Key %s key_map not exist", key) | ||
| return nil, errors.New("APNS key_map not exists") | ||
| } | ||
| if _, ok := PushConf.Ios.KeyMap[key]; !ok { |
| return nil, errors.New("APNS key_password not exists") | ||
| } | ||
| path = PushConf.Ios.KeyMap[key] | ||
| password = PushConf.Ios.KeyMap[key] |
| default: | ||
| err = errors.New("wrong certificate key extension") | ||
| func InitAPNSClient(key string) (*apns.Client, error) { | ||
| path, password := "", "" |
Contributor
There was a problem hiding this comment.
What if PushConf.Ios.Enabled is false?
| notification.log = &log | ||
| notification.AddWaitCount() | ||
| } | ||
| fmt.Println("-----") |
60a7a68 to
2c29b4b
Compare
bff0f2d to
6b6ef69
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I modified sort of the code, let the ios could support multiple certifications. The usage was same as the andriod platform. Make a request as followed
key "apns_client" will find the source from config.yaml.
Certificaton can set in config.yaml as followed
#99