|
@@ -54,10 +54,13 @@ func JgpushNc(alert, infotype string, ids []string, extras map[string]interface{
|
|
|
temp := &Jgconfig.Config
|
|
|
temp.Audience["registration_id"] = ids
|
|
|
android := temp.Notification["android"]
|
|
|
+ alert = shorAlert(alert, Jgconfig.Alertlen)
|
|
|
+ if extras != nil {
|
|
|
+ extras["descript"] = alert
|
|
|
+ }
|
|
|
if tmp, ok := android.(map[string]interface{}); ok {
|
|
|
tmp["title"] = Jgconfig.Title[infotype]
|
|
|
- tmp["alert"] = shorAlert(alert, Jgconfig.Alertlen)
|
|
|
- extras["descript"] = tmp["alert"]
|
|
|
+ tmp["alert"] = alert
|
|
|
tmp["extras"] = map[string]interface{}{
|
|
|
"type": infotype,
|
|
|
"info": extras,
|
|
@@ -65,7 +68,7 @@ func JgpushNc(alert, infotype string, ids []string, extras map[string]interface{
|
|
|
}
|
|
|
ios := temp.Notification["ios"]
|
|
|
if tmp, ok := ios.(map[string]interface{}); ok {
|
|
|
- tmp["alert"] = shorAlert(alert, Jgconfig.Alertlen)
|
|
|
+ tmp["alert"] = alert
|
|
|
tmp["extras"] = map[string]interface{}{
|
|
|
"type": infotype,
|
|
|
"info": extras,
|
|
@@ -96,9 +99,13 @@ func JgpushD_Nc(alert, infotype string, ids []string, extras map[string]interfac
|
|
|
temp := &Jgconfig.Config
|
|
|
temp.Audience["registration_id"] = ids
|
|
|
android := temp.Notification["android"]
|
|
|
+ alert = shorAlert(alert, Jgconfig.Alertlen)
|
|
|
+ if extras != nil {
|
|
|
+ extras["descript"] = alert
|
|
|
+ }
|
|
|
if tmp, ok := android.(map[string]interface{}); ok {
|
|
|
tmp["title"] = Jgconfig.Title[infotype]
|
|
|
- tmp["alert"] = shorAlert(alert, Jgconfig.Alertlen)
|
|
|
+ tmp["alert"] = alert
|
|
|
tmp["extras"] = map[string]interface{}{
|
|
|
"type": infotype,
|
|
|
"info": extras,
|
|
@@ -106,7 +113,7 @@ func JgpushD_Nc(alert, infotype string, ids []string, extras map[string]interfac
|
|
|
}
|
|
|
ios := temp.Notification["ios"]
|
|
|
if tmp, ok := ios.(map[string]interface{}); ok {
|
|
|
- tmp["alert"] = shorAlert(alert, Jgconfig.Alertlen)
|
|
|
+ tmp["alert"] = alert
|
|
|
tmp["extras"] = map[string]interface{}{
|
|
|
"type": infotype,
|
|
|
"info": extras,
|
|
@@ -212,9 +219,13 @@ func JgpushNcAndMsg(alert, infotype string, msg_title, msg_con, msg_type string,
|
|
|
temp := Jgconfig.Config
|
|
|
temp.Audience["registration_id"] = ids
|
|
|
android := temp.Notification["android"]
|
|
|
+ alert = shorAlert(alert, Jgconfig.Alertlen)
|
|
|
+ if extras != nil {
|
|
|
+ extras["descript"] = alert
|
|
|
+ }
|
|
|
if tmp, ok := android.(map[string]interface{}); ok {
|
|
|
tmp["title"] = Jgconfig.Title[infotype]
|
|
|
- tmp["alert"] = shorAlert(alert, Jgconfig.Alertlen)
|
|
|
+ tmp["alert"] = alert
|
|
|
tmp["extras"] = map[string]interface{}{
|
|
|
"type": infotype,
|
|
|
"info": extras,
|
|
@@ -222,7 +233,7 @@ func JgpushNcAndMsg(alert, infotype string, msg_title, msg_con, msg_type string,
|
|
|
}
|
|
|
ios := temp.Notification["ios"]
|
|
|
if tmp, ok := ios.(map[string]interface{}); ok {
|
|
|
- tmp["alert"] = shorAlert(alert, Jgconfig.Alertlen)
|
|
|
+ tmp["alert"] = alert
|
|
|
tmp["extras"] = map[string]interface{}{
|
|
|
"type": infotype,
|
|
|
"info": extras,
|