mirror of
https://github.com/WuKongIM/WuKongIMFlutterSDK
synced 2025-05-28 22:52:20 +00:00
update sync msg name
This commit is contained in:
parent
ce91626554
commit
28c84355dd
2
CHANGELOG.md
Normal file
2
CHANGELOG.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
### 1.0.0
|
||||||
|
* first commint
|
14
LICENSE
Normal file
14
LICENSE
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
wukongimfluttersdk
|
||||||
|
|
||||||
|
|
||||||
|
Copyright <2023> <WuKongIM>
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.I
|
@ -47,12 +47,12 @@ class HttpUtils {
|
|||||||
for (int i = 0; i < list.length; i++) {
|
for (int i = 0; i < list.length; i++) {
|
||||||
var json = list[i];
|
var json = list[i];
|
||||||
WKSyncConvMsg convMsg = WKSyncConvMsg();
|
WKSyncConvMsg convMsg = WKSyncConvMsg();
|
||||||
convMsg.channel_id = json['channel_id'];
|
convMsg.channelID = json['channel_id'];
|
||||||
convMsg.channel_type = json['channel_type'];
|
convMsg.channelType = json['channel_type'];
|
||||||
convMsg.unread = json['unread'];
|
convMsg.unread = json['unread'];
|
||||||
convMsg.timestamp = json['timestamp'];
|
convMsg.timestamp = json['timestamp'];
|
||||||
convMsg.last_msg_seq = json['last_msg_seq'];
|
convMsg.lastMsgSeq = json['last_msg_seq'];
|
||||||
convMsg.last_client_msg_no = json['last_client_msg_no'];
|
convMsg.lastClientMsgNO = json['last_client_msg_no'];
|
||||||
convMsg.version = json['version'];
|
convMsg.version = json['version'];
|
||||||
var msgListJson = json['recents'] as List<dynamic>;
|
var msgListJson = json['recents'] as List<dynamic>;
|
||||||
List<WKSyncMsg> msgList = [];
|
List<WKSyncMsg> msgList = [];
|
||||||
@ -92,8 +92,8 @@ class HttpUtils {
|
|||||||
if (response.statusCode == HttpStatus.ok) {
|
if (response.statusCode == HttpStatus.ok) {
|
||||||
var data = response.data;
|
var data = response.data;
|
||||||
WKSyncChannelMsg msg = WKSyncChannelMsg();
|
WKSyncChannelMsg msg = WKSyncChannelMsg();
|
||||||
msg.start_message_seq = data['start_message_seq'];
|
msg.startMessageSeq = data['start_message_seq'];
|
||||||
msg.end_message_seq = data['end_message_seq'];
|
msg.endMessageSeq = data['end_message_seq'];
|
||||||
msg.more = data['more'];
|
msg.more = data['more'];
|
||||||
var messages = data['messages'] as List<dynamic>;
|
var messages = data['messages'] as List<dynamic>;
|
||||||
List<WKSyncMsg> msgList = [];
|
List<WKSyncMsg> msgList = [];
|
||||||
@ -108,20 +108,18 @@ class HttpUtils {
|
|||||||
|
|
||||||
static WKSyncMsg getWKSyncMsg(dynamic json) {
|
static WKSyncMsg getWKSyncMsg(dynamic json) {
|
||||||
WKSyncMsg msg = WKSyncMsg();
|
WKSyncMsg msg = WKSyncMsg();
|
||||||
msg.channel_id = json['channel_id'];
|
msg.channelID = json['channel_id'];
|
||||||
msg.message_id = json['message_id'].toString();
|
msg.messageID = json['message_id'].toString();
|
||||||
msg.channel_type = json['channel_type'];
|
msg.channelType = json['channel_type'];
|
||||||
msg.client_msg_no = json['client_msg_no'];
|
msg.clientMsgNO = json['client_msg_no'];
|
||||||
msg.message_seq = json['message_seq'];
|
msg.messageSeq = json['message_seq'];
|
||||||
msg.from_uid = json['from_uid'];
|
msg.fromUID = json['from_uid'];
|
||||||
msg.timestamp = json['timestamp'];
|
msg.timestamp = json['timestamp'];
|
||||||
msg.channel_id = json['channel_id'];
|
msg.channelID = json['channel_id'];
|
||||||
// msg.payload = json['payload'];
|
// msg.payload = json['payload'];
|
||||||
String payload = json['payload'];
|
String payload = json['payload'];
|
||||||
// print('消息发送着:${msg.from_uid},${msg.channel_id}');
|
// print('消息发送着:${msg.from_uid},${msg.channel_id}');
|
||||||
try {
|
try {
|
||||||
print(
|
|
||||||
'消息内容:${msg.from_uid},${msg.channel_id}:${utf8.decode(base64Decode(payload))}');
|
|
||||||
msg.payload = jsonDecode(utf8.decode(base64Decode(payload)));
|
msg.payload = jsonDecode(utf8.decode(base64Decode(payload)));
|
||||||
// print('查询的消息${msg.payload}');
|
// print('查询的消息${msg.payload}');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -499,7 +499,7 @@ packages:
|
|||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "1.0.0+1"
|
version: "1.0.0"
|
||||||
x25519:
|
x25519:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -59,8 +59,6 @@ class ConversationDB {
|
|||||||
}
|
}
|
||||||
if (row > 0) {
|
if (row > 0) {
|
||||||
return getUIMsg(conversationMsg);
|
return getUIMsg(conversationMsg);
|
||||||
} else {
|
|
||||||
print('新消息的修改失败');
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:sqflite/sqflite.dart';
|
import 'package:sqflite/sqflite.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:path/path.dart';
|
import 'package:path/path.dart' as p;
|
||||||
|
|
||||||
import '../wkim.dart';
|
import '../wkim.dart';
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ class WKDBHelper {
|
|||||||
Database? _database;
|
Database? _database;
|
||||||
Future<bool> init() async {
|
Future<bool> init() async {
|
||||||
var databasesPath = await getDatabasesPath();
|
var databasesPath = await getDatabasesPath();
|
||||||
String path = join(databasesPath, 'wk_${WKIM.shared.options.uid}.db');
|
String path = p.join(databasesPath, 'wk_${WKIM.shared.options.uid}.db');
|
||||||
_database = await openDatabase(
|
_database = await openDatabase(
|
||||||
path,
|
path,
|
||||||
version: dbVersion,
|
version: dbVersion,
|
||||||
|
@ -104,18 +104,18 @@ class WKUIConversationMsg {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class WKSyncConversation {
|
class WKSyncConversation {
|
||||||
int cmd_version = 0;
|
int cmdVersion = 0;
|
||||||
List<WkSyncCMD>? cmds;
|
List<WkSyncCMD>? cmds;
|
||||||
String uid = '';
|
String uid = '';
|
||||||
List<WKSyncConvMsg>? conversations;
|
List<WKSyncConvMsg>? conversations;
|
||||||
}
|
}
|
||||||
|
|
||||||
class WKSyncConvMsg {
|
class WKSyncConvMsg {
|
||||||
String channel_id = '';
|
String channelID = '';
|
||||||
int channel_type = 0;
|
int channelType = 0;
|
||||||
String last_client_msg_no = '';
|
String lastClientMsgNO = '';
|
||||||
int last_msg_seq = 0;
|
int lastMsgSeq = 0;
|
||||||
int offset_msg_seq = 0;
|
int offsetMsgSeq = 0;
|
||||||
int timestamp = 0;
|
int timestamp = 0;
|
||||||
int unread = 0;
|
int unread = 0;
|
||||||
int version = 0;
|
int version = 0;
|
||||||
|
@ -104,49 +104,49 @@ class WKMsgReaction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class WKSyncMsg {
|
class WKSyncMsg {
|
||||||
String message_id = '';
|
String messageID = '';
|
||||||
int message_seq = 0;
|
int messageSeq = 0;
|
||||||
String client_msg_no = '';
|
String clientMsgNO = '';
|
||||||
String from_uid = '';
|
String fromUID = '';
|
||||||
String channel_id = '';
|
String channelID = '';
|
||||||
int channel_type = 0;
|
int channelType = 0;
|
||||||
int timestamp = 0;
|
int timestamp = 0;
|
||||||
int voice_status = 0;
|
int voiceStatus = 0;
|
||||||
int is_deleted = 0;
|
int isDeleted = 0;
|
||||||
int revoke = 0;
|
int revoke = 0;
|
||||||
String revoker = '';
|
String revoker = '';
|
||||||
int extra_version = 0;
|
int extraVersion = 0;
|
||||||
int unread_count = 0;
|
int unreadCount = 0;
|
||||||
int readed_count = 0;
|
int readedCount = 0;
|
||||||
int readed = 0;
|
int readed = 0;
|
||||||
int receipt = 0;
|
int receipt = 0;
|
||||||
int setting = 0;
|
int setting = 0;
|
||||||
dynamic payload;
|
dynamic payload;
|
||||||
List<WKSyncMsgReaction>? reactions;
|
List<WKSyncMsgReaction>? reactions;
|
||||||
WKSyncExtraMsg? message_extra;
|
WKSyncExtraMsg? messageExtra;
|
||||||
|
|
||||||
WKMsg getWKMsg() {
|
WKMsg getWKMsg() {
|
||||||
WKMsg msg = WKMsg();
|
WKMsg msg = WKMsg();
|
||||||
msg.channelID = channel_id;
|
msg.channelID = channelID;
|
||||||
msg.channelType = channel_type;
|
msg.channelType = channelType;
|
||||||
msg.messageID = message_id;
|
msg.messageID = messageID;
|
||||||
msg.messageSeq = message_seq;
|
msg.messageSeq = messageSeq;
|
||||||
msg.clientMsgNO = client_msg_no;
|
msg.clientMsgNO = clientMsgNO;
|
||||||
msg.fromUID = from_uid;
|
msg.fromUID = fromUID;
|
||||||
msg.timestamp = timestamp;
|
msg.timestamp = timestamp;
|
||||||
msg.orderSeq = msg.messageSeq * WKIM.shared.messageManager.wkOrderSeqFactor;
|
msg.orderSeq = msg.messageSeq * WKIM.shared.messageManager.wkOrderSeqFactor;
|
||||||
msg.voiceStatus = voice_status;
|
msg.voiceStatus = voiceStatus;
|
||||||
msg.isDeleted = is_deleted;
|
msg.isDeleted = isDeleted;
|
||||||
msg.status = WKSendMsgResult.sendSuccess;
|
msg.status = WKSendMsgResult.sendSuccess;
|
||||||
msg.wkMsgExtra = WKMsgExtra();
|
msg.wkMsgExtra = WKMsgExtra();
|
||||||
msg.wkMsgExtra!.revoke = revoke;
|
msg.wkMsgExtra!.revoke = revoke;
|
||||||
msg.wkMsgExtra!.revoker = revoker;
|
msg.wkMsgExtra!.revoker = revoker;
|
||||||
msg.wkMsgExtra!.unreadCount = unread_count;
|
msg.wkMsgExtra!.unreadCount = unreadCount;
|
||||||
msg.wkMsgExtra!.readedCount = readed_count;
|
msg.wkMsgExtra!.readedCount = readedCount;
|
||||||
msg.wkMsgExtra!.readed = readed;
|
msg.wkMsgExtra!.readed = readed;
|
||||||
// msg.reactionList = reactions;
|
// msg.reactionList = reactions;
|
||||||
// msg.receipt = receipt;
|
// msg.receipt = receipt;
|
||||||
msg.wkMsgExtra!.extraVersion = extra_version;
|
msg.wkMsgExtra!.extraVersion = extraVersion;
|
||||||
//处理消息设置
|
//处理消息设置
|
||||||
msg.setting = msg.setting.decode(setting);
|
msg.setting = msg.setting.decode(setting);
|
||||||
//如果是单聊先将channelId改成发送者ID
|
//如果是单聊先将channelId改成发送者ID
|
||||||
@ -177,15 +177,15 @@ class WKSyncMsg {
|
|||||||
List<WKMsgReaction> list = [];
|
List<WKMsgReaction> list = [];
|
||||||
for (int i = 0, size = msgReaction.length; i < size; i++) {
|
for (int i = 0, size = msgReaction.length; i < size; i++) {
|
||||||
WKMsgReaction reaction = WKMsgReaction();
|
WKMsgReaction reaction = WKMsgReaction();
|
||||||
reaction.channelID = msgReaction[i].channel_id;
|
reaction.channelID = msgReaction[i].channelID;
|
||||||
reaction.channelType = msgReaction[i].channel_type;
|
reaction.channelType = msgReaction[i].channelType;
|
||||||
reaction.uid = msgReaction[i].uid;
|
reaction.uid = msgReaction[i].uid;
|
||||||
reaction.name = msgReaction[i].name;
|
reaction.name = msgReaction[i].name;
|
||||||
reaction.emoji = msgReaction[i].emoji;
|
reaction.emoji = msgReaction[i].emoji;
|
||||||
reaction.seq = msgReaction[i].seq;
|
reaction.seq = msgReaction[i].seq;
|
||||||
reaction.isDeleted = msgReaction[i].is_deleted;
|
reaction.isDeleted = msgReaction[i].isDeleted;
|
||||||
reaction.messageID = msgReaction[i].message_id;
|
reaction.messageID = msgReaction[i].messageID;
|
||||||
reaction.createdAt = msgReaction[i].created_at;
|
reaction.createdAt = msgReaction[i].createdAt;
|
||||||
list.add(reaction);
|
list.add(reaction);
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
@ -193,35 +193,35 @@ class WKSyncMsg {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class WKSyncMsgReaction {
|
class WKSyncMsgReaction {
|
||||||
String message_id = '';
|
String messageID = '';
|
||||||
String uid = '';
|
String uid = '';
|
||||||
String name = '';
|
String name = '';
|
||||||
String channel_id = '';
|
String channelID = '';
|
||||||
int channel_type = 0;
|
int channelType = 0;
|
||||||
int seq = 0;
|
int seq = 0;
|
||||||
String emoji = '';
|
String emoji = '';
|
||||||
int is_deleted = 0;
|
int isDeleted = 0;
|
||||||
String created_at = '';
|
String createdAt = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
class WKSyncExtraMsg {
|
class WKSyncExtraMsg {
|
||||||
int message_id = 0;
|
int messageID = 0;
|
||||||
String message_id_str = '';
|
String messageIdStr = '';
|
||||||
int revoke = 0;
|
int revoke = 0;
|
||||||
String revoker = '';
|
String revoker = '';
|
||||||
int voice_status = 0;
|
int voiceStatus = 0;
|
||||||
int is_mutual_deleted = 0;
|
int isMutualDeleted = 0;
|
||||||
int extra_version = 0;
|
int extraVersion = 0;
|
||||||
int unread_count = 0;
|
int unreadCount = 0;
|
||||||
int readed_count = 0;
|
int readedCount = 0;
|
||||||
int readed = 0;
|
int readed = 0;
|
||||||
dynamic content_edit;
|
dynamic contentEdit;
|
||||||
int edited_at = 0;
|
int editedAt = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
class WKSyncChannelMsg {
|
class WKSyncChannelMsg {
|
||||||
int start_message_seq = 0;
|
int startMessageSeq = 0;
|
||||||
int end_message_seq = 0;
|
int endMessageSeq = 0;
|
||||||
int more = 0;
|
int more = 0;
|
||||||
List<WKSyncMsg>? messages = [];
|
List<WKSyncMsg>? messages = [];
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ class _WKSocket {
|
|||||||
_socket.add(data);
|
_socket.add(data);
|
||||||
_socket.flush();
|
_socket.flush();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Logs.error('发送消息错误${e}');
|
Logs.debug('发送消息错误');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -383,10 +383,10 @@ class WKConnectionManager {
|
|||||||
msg.orderSeq = await WKIM.shared.messageManager
|
msg.orderSeq = await WKIM.shared.messageManager
|
||||||
.getMessageOrderSeq(msg.messageSeq, msg.channelID, msg.channelType);
|
.getMessageOrderSeq(msg.messageSeq, msg.channelID, msg.channelType);
|
||||||
dynamic contentJson = jsonDecode(msg.content);
|
dynamic contentJson = jsonDecode(msg.content);
|
||||||
|
msg.contentType = contentJson['type'];
|
||||||
msg.isDeleted = _isDeletedMsg(contentJson);
|
msg.isDeleted = _isDeletedMsg(contentJson);
|
||||||
msg.messageContent = WKIM.shared.messageManager
|
msg.messageContent = WKIM.shared.messageManager
|
||||||
.getMessageModel(msg.contentType, contentJson);
|
.getMessageModel(msg.contentType, contentJson);
|
||||||
msg.contentType = msg.messageContent!.contentType;
|
|
||||||
WKIM.shared.messageManager.parsingMsg(msg);
|
WKIM.shared.messageManager.parsingMsg(msg);
|
||||||
WKIM.shared.messageManager.saveMsg(msg);
|
WKIM.shared.messageManager.saveMsg(msg);
|
||||||
if (msg.isDeleted == 0 &&
|
if (msg.isDeleted == 0 &&
|
||||||
|
@ -122,18 +122,18 @@ class WKConversationManager {
|
|||||||
if (syncChat.conversations != null && syncChat.conversations!.isNotEmpty) {
|
if (syncChat.conversations != null && syncChat.conversations!.isNotEmpty) {
|
||||||
for (int i = 0, size = syncChat.conversations!.length; i < size; i++) {
|
for (int i = 0, size = syncChat.conversations!.length; i < size; i++) {
|
||||||
WKConversationMsg conversationMsg = WKConversationMsg();
|
WKConversationMsg conversationMsg = WKConversationMsg();
|
||||||
int channelType = syncChat.conversations![i].channel_type;
|
int channelType = syncChat.conversations![i].channelType;
|
||||||
String channelID = syncChat.conversations![i].channel_id;
|
String channelID = syncChat.conversations![i].channelID;
|
||||||
if (channelType == WKChannelType.communityTopic) {
|
if (channelType == WKChannelType.communityTopic) {
|
||||||
var str = channelID.split("@");
|
var str = channelID.split("@");
|
||||||
conversationMsg.parentChannelID = str[0];
|
conversationMsg.parentChannelID = str[0];
|
||||||
conversationMsg.parentChannelType = WKChannelType.community;
|
conversationMsg.parentChannelType = WKChannelType.community;
|
||||||
}
|
}
|
||||||
conversationMsg.channelID = syncChat.conversations![i].channel_id;
|
conversationMsg.channelID = syncChat.conversations![i].channelID;
|
||||||
conversationMsg.channelType = syncChat.conversations![i].channel_type;
|
conversationMsg.channelType = syncChat.conversations![i].channelType;
|
||||||
conversationMsg.lastMsgSeq = syncChat.conversations![i].last_msg_seq;
|
conversationMsg.lastMsgSeq = syncChat.conversations![i].lastMsgSeq;
|
||||||
conversationMsg.lastClientMsgNO =
|
conversationMsg.lastClientMsgNO =
|
||||||
syncChat.conversations![i].last_client_msg_no;
|
syncChat.conversations![i].lastClientMsgNO;
|
||||||
conversationMsg.lastMsgTimestamp = syncChat.conversations![i].timestamp;
|
conversationMsg.lastMsgTimestamp = syncChat.conversations![i].timestamp;
|
||||||
conversationMsg.unreadCount = syncChat.conversations![i].unread;
|
conversationMsg.unreadCount = syncChat.conversations![i].unread;
|
||||||
conversationMsg.version = syncChat.conversations![i].version;
|
conversationMsg.version = syncChat.conversations![i].version;
|
||||||
@ -149,10 +149,10 @@ class WKConversationManager {
|
|||||||
if (conversationMsg.lastClientMsgNO == msg.clientMsgNO) {
|
if (conversationMsg.lastClientMsgNO == msg.clientMsgNO) {
|
||||||
conversationMsg.isDeleted = msg.isDeleted;
|
conversationMsg.isDeleted = msg.isDeleted;
|
||||||
}
|
}
|
||||||
if (wkSyncRecent.message_extra != null) {
|
if (wkSyncRecent.messageExtra != null) {
|
||||||
WKMsgExtra extra = WKIM.shared.messageManager
|
WKMsgExtra extra = WKIM.shared.messageManager
|
||||||
.wkSyncExtraMsg2WKMsgExtra(msg.channelID, msg.channelType,
|
.wkSyncExtraMsg2WKMsgExtra(msg.channelID, msg.channelType,
|
||||||
wkSyncRecent.message_extra!);
|
wkSyncRecent.messageExtra!);
|
||||||
msgExtraList.add(extra);
|
msgExtraList.add(extra);
|
||||||
}
|
}
|
||||||
msgList.add(msg);
|
msgList.add(msg);
|
||||||
|
@ -123,10 +123,10 @@ class WKMessageManager {
|
|||||||
for (int j = 0, len = list.length; j < len; j++) {
|
for (int j = 0, len = list.length; j < len; j++) {
|
||||||
WKMsg wkMsg = list[j].getWKMsg();
|
WKMsg wkMsg = list[j].getWKMsg();
|
||||||
msgList.add(wkMsg);
|
msgList.add(wkMsg);
|
||||||
if (list[j].message_extra != null) {
|
if (list[j].messageExtra != null) {
|
||||||
if (list[j].message_extra != null) {
|
if (list[j].messageExtra != null) {
|
||||||
WKMsgExtra extra = wkSyncExtraMsg2WKMsgExtra(
|
WKMsgExtra extra = wkSyncExtraMsg2WKMsgExtra(
|
||||||
wkMsg.channelID, wkMsg.channelType, list[j].message_extra!);
|
wkMsg.channelID, wkMsg.channelType, list[j].messageExtra!);
|
||||||
msgExtraList.add(extra);
|
msgExtraList.add(extra);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -144,20 +144,20 @@ class WKMessageManager {
|
|||||||
WKMsgExtra extra = WKMsgExtra();
|
WKMsgExtra extra = WKMsgExtra();
|
||||||
extra.channelID = channelID;
|
extra.channelID = channelID;
|
||||||
extra.channelType = channelType;
|
extra.channelType = channelType;
|
||||||
extra.unreadCount = extraMsg.unread_count;
|
extra.unreadCount = extraMsg.unreadCount;
|
||||||
extra.readedCount = extraMsg.readed_count;
|
extra.readedCount = extraMsg.readedCount;
|
||||||
extra.readed = extraMsg.readed;
|
extra.readed = extraMsg.readed;
|
||||||
extra.messageID = extraMsg.message_id_str;
|
extra.messageID = extraMsg.messageIdStr;
|
||||||
extra.isMutualDeleted = extraMsg.is_mutual_deleted;
|
extra.isMutualDeleted = extraMsg.isMutualDeleted;
|
||||||
extra.extraVersion = extraMsg.extra_version;
|
extra.extraVersion = extraMsg.extraVersion;
|
||||||
extra.revoke = extraMsg.revoke;
|
extra.revoke = extraMsg.revoke;
|
||||||
extra.revoker = extraMsg.revoker;
|
extra.revoker = extraMsg.revoker;
|
||||||
extra.needUpload = 0;
|
extra.needUpload = 0;
|
||||||
if (extraMsg.content_edit != null) {
|
if (extraMsg.contentEdit != null) {
|
||||||
extra.contentEdit = jsonEncode(extraMsg.content_edit);
|
extra.contentEdit = jsonEncode(extraMsg.contentEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
extra.editedAt = extraMsg.edited_at;
|
extra.editedAt = extraMsg.editedAt;
|
||||||
return extra;
|
return extra;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,6 @@ PacketHeader decodeHeader(ReadData reader) {
|
|||||||
if (header.packetType != PacketType.ping &&
|
if (header.packetType != PacketType.ping &&
|
||||||
header.packetType != PacketType.pong) {
|
header.packetType != PacketType.pong) {
|
||||||
header.remainingLength = reader.readVariableLength();
|
header.remainingLength = reader.readVariableLength();
|
||||||
print('科技长度${header.remainingLength}');
|
|
||||||
}
|
}
|
||||||
return header;
|
return header;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "5.3.2"
|
version: "5.3.2"
|
||||||
encrypt:
|
encrypt:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: encrypt
|
name: encrypt
|
||||||
sha256: "4fd4e4fdc21b9d7d4141823e1e6515cd94e7b8d84749504c232999fba25d9bbb"
|
sha256: "4fd4e4fdc21b9d7d4141823e1e6515cd94e7b8d84749504c232999fba25d9bbb"
|
||||||
@ -265,7 +265,7 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.1"
|
version: "1.9.1"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
name: wukongimfluttersdk
|
name: wukongimfluttersdk
|
||||||
description: A new Flutter project.
|
description: wukong IM flutter sdk
|
||||||
# The following line prevents the package from being accidentally published to
|
# The following line prevents the package from being accidentally published to
|
||||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|
||||||
|
|
||||||
# The following defines the version and build number for your application.
|
# The following defines the version and build number for your application.
|
||||||
# A version number is three numbers separated by dots, like 1.2.43
|
# A version number is three numbers separated by dots, like 1.2.43
|
||||||
@ -16,7 +15,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# 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.0.0+1
|
version: 1.0.0
|
||||||
|
homepage: https://github.com/WuKongIM/WuKongIMFlutterSDK
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.0.6 <4.0.0'
|
sdk: '>=3.0.6 <4.0.0'
|
||||||
@ -34,6 +34,8 @@ dependencies:
|
|||||||
|
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
|
path: ^1.8.3
|
||||||
|
encrypt: ^5.0.1
|
||||||
cupertino_icons: ^1.0.2
|
cupertino_icons: ^1.0.2
|
||||||
x25519: ^0.1.1
|
x25519: ^0.1.1
|
||||||
encryptions: ^1.1.0+1
|
encryptions: ^1.1.0+1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user