소스 검색

fix:push推送校验

duxin 1 년 전
부모
커밋
0640f29d11
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      rpc/internal/common/appPush.go

+ 4 - 1
rpc/internal/common/appPush.go

@@ -8,6 +8,7 @@ import (
 	"k8s.io/apimachinery/pkg/util/json"
 	"log"
 	"net/rpc"
+	"strings"
 )
 
 func AppPushMsg(userInfo map[string]interface{}, stm, appPushUrl, title, detail string) error {
@@ -28,7 +29,9 @@ func AppPushMsg(userInfo map[string]interface{}, stm, appPushUrl, title, detail
 				phoneType = qutil.ObjToString(userInfo["s_appponetype"])
 				name = qutil.ObjToString(userInfo["s_name"])
 				appVersion = qutil.ObjToString(userInfo["s_appversion"])
-
+				if strings.HasPrefix(appPushUrl, "/") {
+					appPushUrl = appPushUrl[1:]
+				}
 				dt := map[string]interface{}{
 					"receiveUserId": userId,
 					"receiveName":   name,