From 19fac9051f57726ac8ee6620a27c4eebb2f917a4 Mon Sep 17 00:00:00 2001 From: polaris <2673986789@qq.com> Date: Wed, 10 Jul 2024 00:58:06 +0800 Subject: [PATCH] fix: restrict length of payload --- push/mipush/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/push/mipush/main.go b/push/mipush/main.go index 2f4f7c8..2ffbada 100644 --- a/push/mipush/main.go +++ b/push/mipush/main.go @@ -45,7 +45,7 @@ func (s *Sender) Send() { "description": common.StripContent(s.Message.Description, 127), // 消息的内容。(注意:需要对payload字符串做urlencode处理) - "payload": url.QueryEscape(string(payload)), + "payload": common.StripContent(url.QueryEscape(string(payload)), 4095), // 可选项,预定义通知栏消息的点击行为。通过设置extra.notify_effect的值以得到不同的预定义点击行为。 // “1″:通知栏点击后打开app的Launcher Activity。