Modification of sending messages containing replies error

This commit is contained in:
SL 2024-02-23 15:27:32 +08:00
parent b23f6d3a45
commit 4c83ae1697
5 changed files with 11 additions and 6 deletions

View File

@ -58,3 +58,5 @@
* Modify the editing message method parameters * Modify the editing message method parameters
### 1.2.9 ### 1.2.9
* Modification of sending messages containing replies or tag class message parsing errors * Modification of sending messages containing replies or tag class message parsing errors
### 1.3.0
* Modification of sending messages containing replies error

View File

@ -9,7 +9,7 @@
#### 安装 #### 安装
``` ```
dependencies: dependencies:
wukongimfluttersdk: ^1.2.9 wukongimfluttersdk: ^1.3.0
``` ```
#### 引入 #### 引入
```dart ```dart

View File

@ -374,6 +374,8 @@ class ChatListDataState extends State<ChatList> {
reply.rootMid = "111"; reply.rootMid = "111";
reply.fromUID = "11"; reply.fromUID = "11";
reply.fromName = "12"; reply.fromName = "12";
WKTextContent payloadText = WKTextContent("dds");
reply.payload = payloadText;
text.reply = reply; text.reply = reply;
List<WKMsgEntity> list = []; List<WKMsgEntity> list = [];
WKMsgEntity entity = WKMsgEntity(); WKMsgEntity entity = WKMsgEntity();

View File

@ -262,9 +262,10 @@ class WKReply {
messageSeq = WKDBConst.readInt(data, 'message_seq'); messageSeq = WKDBConst.readInt(data, 'message_seq');
fromUID = WKDBConst.readString(data, 'from_uid'); fromUID = WKDBConst.readString(data, 'from_uid');
fromName = WKDBConst.readString(data, 'from_name'); fromName = WKDBConst.readString(data, 'from_name');
String contentJson = WKDBConst.readString(data, 'payload'); var json = data['payload'];
if (contentJson != '') { // String contentJson = WKDBConst.readString(data, 'payload');
var json = jsonDecode(contentJson); if (json != null) {
// var json = jsonDecode(contentJson);
var type = json['type']; var type = json['type'];
payload = WKIM.shared.messageManager.getMessageModel(type, json); payload = WKIM.shared.messageManager.getMessageModel(type, json);
} }

View File

@ -15,7 +15,7 @@ description: wukong IM flutter sdk
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # 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 # 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. # of the product and file versions while build-number is used as the build suffix.
version: 1.2.9 version: 1.3.0
homepage: https://github.com/WuKongIM/WuKongIMFlutterSDK homepage: https://github.com/WuKongIM/WuKongIMFlutterSDK
environment: environment: