扫一扫
This commit is contained in:
@@ -921,6 +921,18 @@ export class ChatBaseViewModel {
|
||||
// payload.put("apns-from-id", NimUIKit.getAccount());//ios需要
|
||||
// msg.pushConfig = {} as V2NIMMessagePushConfig
|
||||
// msg.pushConfig.pushPayload=''
|
||||
// 2. 设置推送负载(新增核心代码)
|
||||
const pushPayload: Record<string, Record<string,string> | string> = {
|
||||
"vivoField": {"classification":"1"},
|
||||
"apns-collapse-id": "321",
|
||||
"apns-from-id": ChatKitClient.getLoginUserId()
|
||||
};
|
||||
|
||||
if (!msg.pushConfig) {
|
||||
msg.pushConfig = {} as V2NIMMessagePushConfig;
|
||||
}
|
||||
msg.pushConfig.pushPayload = JSON.stringify(pushPayload)
|
||||
|
||||
ChatRepo.sendMessage(this.beforeSendMessage(msg), this.conversationId!, params, progress)
|
||||
.catch((err: BusinessError) => {
|
||||
console.error("net ease send message error", err.code, err.message);
|
||||
|
||||
Reference in New Issue
Block a user