长度 ≤ 256字
This commit is contained in:
parent
c1e936c8e5
commit
a79e5bdfcd
|
@ -114,6 +114,12 @@ func (g *Getui) Token() string {
|
|||
}
|
||||
|
||||
func (g *Getui) Push(req *GetuiMessage) (*GetuiPushRsp, error) {
|
||||
if len(req.Title) > 50 {
|
||||
req.Title = string([]rune(req.Title)[:16])
|
||||
}
|
||||
if len(req.Message) > 256 {
|
||||
req.Message = string([]rune(req.Message)[:80])
|
||||
}
|
||||
reqUrl := fmt.Sprintf("https://restapi.getui.com/v2/%s/push/single/cid", g.config.AppId)
|
||||
|
||||
params := make(map[string]interface{})
|
||||
|
|
Loading…
Reference in New Issue