mirror of
https://github.com/WuKongIM/WuKongIMFlutterSDK
synced 2025-05-28 22:52:20 +00:00
update data analysis
This commit is contained in:
parent
15489525a8
commit
cb8aeacf96
@ -1,5 +1,7 @@
|
||||
import 'dart:collection';
|
||||
|
||||
import 'package:wukongimfluttersdk/db/const.dart';
|
||||
|
||||
import '../entity/cmd.dart';
|
||||
|
||||
class WKCMDManager {
|
||||
@ -9,7 +11,7 @@ class WKCMDManager {
|
||||
|
||||
HashMap<String, Function(WKCMD)>? _cmdback;
|
||||
handleCMD(dynamic json) {
|
||||
String cmd = json['cmd'];
|
||||
String cmd = WKDBConst.readString(json, 'cmd');
|
||||
dynamic param = json['param'];
|
||||
WKCMD wkcmd = WKCMD();
|
||||
wkcmd.cmd = cmd;
|
||||
|
@ -4,6 +4,7 @@ import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'dart:typed_data';
|
||||
import 'package:connectivity/connectivity.dart';
|
||||
import 'package:wukongimfluttersdk/db/const.dart';
|
||||
|
||||
import 'package:wukongimfluttersdk/db/wk_db_helper.dart';
|
||||
import 'package:wukongimfluttersdk/entity/msg.dart';
|
||||
@ -395,7 +396,7 @@ class WKConnectionManager {
|
||||
msg.orderSeq = await WKIM.shared.messageManager
|
||||
.getMessageOrderSeq(msg.messageSeq, msg.channelID, msg.channelType);
|
||||
dynamic contentJson = jsonDecode(msg.content);
|
||||
msg.contentType = contentJson['type'];
|
||||
msg.contentType = WKDBConst.readInt(contentJson, 'type');
|
||||
msg.isDeleted = _isDeletedMsg(contentJson);
|
||||
msg.messageContent = WKIM.shared.messageManager
|
||||
.getMessageModel(msg.contentType, contentJson);
|
||||
|
@ -3,6 +3,7 @@ import 'dart:convert';
|
||||
|
||||
import 'package:uuid/uuid.dart';
|
||||
import 'package:wukongimfluttersdk/common/logs.dart';
|
||||
import 'package:wukongimfluttersdk/db/const.dart';
|
||||
import 'package:wukongimfluttersdk/db/message.dart';
|
||||
import 'package:wukongimfluttersdk/entity/msg.dart';
|
||||
import 'package:wukongimfluttersdk/model/wk_media_message_content.dart';
|
||||
@ -63,8 +64,8 @@ class WKMessageManager {
|
||||
wkMsg.contentType = WkMessageContentType.contentFormatError;
|
||||
return;
|
||||
}
|
||||
if (wkMsg.fromUID == '') {
|
||||
wkMsg.fromUID = json['from_uid'];
|
||||
if (wkMsg.fromUID == "") {
|
||||
wkMsg.fromUID = WKDBConst.readString(json, 'from_uid');
|
||||
}
|
||||
if (wkMsg.channelType == WKChannelType.personal &&
|
||||
wkMsg.channelID != '' &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user