@@ -46,7 +46,7 @@ func getChannelProperties() AndroidChannelProperties {
4646 }
4747}
4848
49- func SendAndroidGroupcastWithGoApp (title , text , ticker , tag string ) error {
49+ func SendAndroidGroupcastWithGoApp (title , text , ticker , tag , description string ) error {
5050 message := AndroidGroupcastMessage {
5151 AppKey : config .Umeng .Android .AppKey ,
5252 Timestamp : fmt .Sprintf ("%d" , time .Now ().Unix ()),
@@ -71,7 +71,7 @@ func SendAndroidGroupcastWithGoApp(title, text, ticker, tag string) error {
7171 ExpireTime : time .Now ().Add (constants .UmengMessageExpireTime ).Format ("2006-01-02 15:04:05" ),
7272 NotificationClosedFilter : true ,
7373 },
74- Description : "Android-广播通知" ,
74+ Description : description ,
7575 Category : 0 ,
7676 ChannelProperties : getChannelProperties (),
7777 }
@@ -80,7 +80,7 @@ func SendAndroidGroupcastWithGoApp(title, text, ticker, tag string) error {
8080}
8181
8282// Android广播函数
83- func SendAndroidGroupcastWithUrl (title , text , ticker , url , tag string ) error {
83+ func SendAndroidGroupcastWithUrl (title , text , ticker , url , tag , description string ) error {
8484 message := AndroidGroupcastMessage {
8585 AppKey : config .Umeng .Android .AppKey ,
8686 Timestamp : fmt .Sprintf ("%d" , time .Now ().Unix ()),
@@ -106,7 +106,7 @@ func SendAndroidGroupcastWithUrl(title, text, ticker, url, tag string) error {
106106 ExpireTime : time .Now ().Add (constants .UmengMessageExpireTime ).Format ("2006-01-02 15:04:05" ),
107107 NotificationClosedFilter : true ,
108108 },
109- Description : "Android-广播通知" ,
109+ Description : description ,
110110 Category : 0 ,
111111 ChannelProperties : getChannelProperties (),
112112 }
@@ -115,7 +115,7 @@ func SendAndroidGroupcastWithUrl(title, text, ticker, url, tag string) error {
115115}
116116
117117// iOS广播函数
118- func SendIOSGroupcast (title , subtitle , body , tag string ) error {
118+ func SendIOSGroupcast (title , subtitle , body , tag , description string ) error {
119119 message := IOSGroupcastMessage {
120120 AppKey : config .Umeng .IOS .AppKey ,
121121 Timestamp : fmt .Sprintf ("%d" , time .Now ().Unix ()),
@@ -141,7 +141,7 @@ func SendIOSGroupcast(title, subtitle, body, tag string) error {
141141 Policy : IOSPolicy {
142142 ExpireTime : time .Now ().Add (constants .UmengMessageExpireTime ).Format ("2006-01-02 15:04:05" ),
143143 },
144- Description : "iOS-广播通知" ,
144+ Description : description ,
145145 }
146146
147147 return sendGroupcast (config .Umeng .IOS .AppMasterSecret , message )
@@ -184,7 +184,6 @@ func sendGroupcast(appMasterSecret string, message interface{}) error {
184184 return errno .Errorf (errno .InternalServiceErrorCode , "umeng.sendGroupcast : Groupcast failed: %s (%s)" , response .Data .ErrorMsg , response .Data .ErrorCode )
185185 }
186186
187- logger .Infof ("Groupcast sent successfully! MsgID: %s\n " , response .Data .MsgID )
188187 return nil
189188}
190189
0 commit comments