请问这个消息通过什么发的?
我们通过 pc 端去发 richNotification 消息,uni-chat-uts 的是对的,下面是我们的测试代码:
let richNotification = new RichNotificationMessageContent();
richNotification.title = 'title'
richNotification.desc = 'desc'
richNotification.remark = 'remark'
richNotification.datas = [
{
key: '登录用户',
value: '野火 IM',
color: '#173155'
},
{
key: '登录用户1',
value: '野火 IM1',
color: '#173155'
},
{
key: '登录用户2',
value: '野火 IM2',
color: '#173155'
}
];
richNotification.exName = 'exName'
richNotification.exPortrait = 'exPortrait'
richNotification.exUrl = 'https://wildfirechat.com'
richNotification.appId = 'appId'
let conversation = new Conversation(ConversationType.Single, "Ur_2U2QQ", 0)
wfc.sendConversationMessage(conversation, richNotification)
uni-chat-uts 收到的数据如下:
{
"type": 12,
"mentionedType": 0,
"extra": "",
"pushContent": "title",
"fromSelf": false,
"title": "title",
"desc": "desc",
"remark": "remark",
"datas": [
{
"key": "登录用户",
"value": "野火 IM",
"color": "#173155"
},
{
"key": "登录用户1",
"value": "野火 IM1",
"color": "#173155"
},
{
"key": "登录用户2",
"value": "野火 IM2",
"color": "#173155"
}
],
"exName": "exName",
"exPortrait": "exPortrait",
"exUrl": "https://wildfirechat.com",
"appId": "appId"
}