mirror of
https://github.com/WuKongIM/WuKongIMFlutterSDK
synced 2025-05-29 15:12:20 +00:00
Modification of sending messages containing replies or tag class message parsing errors
This commit is contained in:
parent
39fe1e321f
commit
b23f6d3a45
@ -55,4 +55,6 @@
|
||||
### 1.2.7
|
||||
* update query channel member avatar
|
||||
### 1.2.8
|
||||
* Modify the editing message method parameters
|
||||
* Modify the editing message method parameters
|
||||
### 1.2.9
|
||||
* Modification of sending messages containing replies or tag class message parsing errors
|
@ -9,7 +9,7 @@
|
||||
#### 安装
|
||||
```
|
||||
dependencies:
|
||||
wukongimfluttersdk: ^1.2.8
|
||||
wukongimfluttersdk: ^1.2.9
|
||||
```
|
||||
#### 引入
|
||||
```dart
|
||||
|
@ -1,3 +1,5 @@
|
||||
import 'dart:ffi';
|
||||
|
||||
import 'package:example/const.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wukongimfluttersdk/entity/channel.dart';
|
||||
@ -366,12 +368,23 @@ class ChatListDataState extends State<ChatList> {
|
||||
_textEditingController.text = '';
|
||||
Setting setting = Setting();
|
||||
setting.receipt = 1; //开启回执
|
||||
// WKTextContent text = WKTextContent(content);
|
||||
CustomMsg customMsg = CustomMsg(content);
|
||||
WKTextContent text = WKTextContent(content);
|
||||
WKReply reply = WKReply();
|
||||
reply.messageId = "11";
|
||||
reply.rootMid = "111";
|
||||
reply.fromUID = "11";
|
||||
reply.fromName = "12";
|
||||
text.reply = reply;
|
||||
List<WKMsgEntity> list = [];
|
||||
WKMsgEntity entity = WKMsgEntity();
|
||||
entity.offset = 0;
|
||||
entity.value = "1";
|
||||
entity.length = 1;
|
||||
list.add(entity);
|
||||
text.entities = list;
|
||||
// CustomMsg customMsg = CustomMsg(content);
|
||||
WKIM.shared.messageManager.sendMessageWithSetting(
|
||||
customMsg,
|
||||
WKChannel(channelID, channelType),
|
||||
setting);
|
||||
text, WKChannel(channelID, channelType), setting);
|
||||
// WKImageContent imageContent = WKImageContent(100, 200);
|
||||
// imageContent.localPath = 'addskds';
|
||||
// WKIM.shared.messageManager.sendMessage(
|
||||
|
@ -61,14 +61,15 @@ class WKMessageManager {
|
||||
}
|
||||
content ??= WKUnknownContent();
|
||||
// 回复
|
||||
var replyJson = WKDBConst.readString(json, 'reply');
|
||||
if (replyJson != '') {
|
||||
var reply = WKReply().decode(jsonDecode(replyJson));
|
||||
var replyJson = json['reply'];
|
||||
if (replyJson != null) {
|
||||
var reply = WKReply().decode(replyJson);
|
||||
content.reply = reply;
|
||||
}
|
||||
var entities = WKDBConst.readString(json, 'entities');
|
||||
if (entities != '') {
|
||||
var jsonArray = jsonDecode(entities);
|
||||
// var entities = WKDBConst.readString(json, 'entities');
|
||||
var jsonArray = json['entities'];
|
||||
if (jsonArray != null) {
|
||||
// var jsonArray = jsonDecode(entities);
|
||||
List<WKMsgEntity> list = [];
|
||||
for (var entityJson in jsonArray) {
|
||||
WKMsgEntity entity = WKMsgEntity();
|
||||
|
@ -15,7 +15,7 @@ description: wukong IM flutter sdk
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.2.8
|
||||
version: 1.2.9
|
||||
homepage: https://github.com/WuKongIM/WuKongIMFlutterSDK
|
||||
|
||||
environment:
|
||||
|
Loading…
x
Reference in New Issue
Block a user