Skip to content

Commit 19fac90

Browse files
committed
fix: restrict length of payload
1 parent 5e6af5a commit 19fac90

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

push/mipush/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (s *Sender) Send() {
4545
"description": common.StripContent(s.Message.Description, 127),
4646

4747
// 消息的内容。(注意:需要对payload字符串做urlencode处理)
48-
"payload": url.QueryEscape(string(payload)),
48+
"payload": common.StripContent(url.QueryEscape(string(payload)), 4095),
4949

5050
// 可选项,预定义通知栏消息的点击行为。通过设置extra.notify_effect的值以得到不同的预定义点击行为。
5151
// “1″:通知栏点击后打开app的Launcher Activity。

0 commit comments

Comments
 (0)