mirror of
https://github.com/WuKongIM/WuKongIMFlutterSDK
synced 2025-05-29 15:12:20 +00:00
fix: Update send & recv message No fromChannel information added
This commit is contained in:
parent
7bf9fe5d43
commit
b0c06930fb
@ -87,4 +87,6 @@
|
||||
### 1.4.3
|
||||
* fix: Modifying messages sent by oneself will increase the issue of unread quantity
|
||||
### 1.4.4
|
||||
* fix: Update parsing channel member extension data
|
||||
* fix: Update parsing channel member extension data
|
||||
### 1.4.5
|
||||
* fix: Update send & recv message No fromChannel information added
|
@ -9,6 +9,8 @@ import 'package:uuid/uuid.dart';
|
||||
import 'package:wukongimfluttersdk/db/const.dart';
|
||||
|
||||
import 'package:wukongimfluttersdk/db/wk_db_helper.dart';
|
||||
import 'package:wukongimfluttersdk/entity/channel.dart';
|
||||
import 'package:wukongimfluttersdk/entity/channel_member.dart';
|
||||
import 'package:wukongimfluttersdk/entity/msg.dart';
|
||||
import 'package:wukongimfluttersdk/proto/write_read.dart';
|
||||
import 'package:wukongimfluttersdk/wkim.dart';
|
||||
@ -454,6 +456,18 @@ class WKConnectionManager {
|
||||
msg.isDeleted = _isDeletedMsg(contentJson);
|
||||
msg.messageContent = WKIM.shared.messageManager
|
||||
.getMessageModel(msg.contentType, contentJson);
|
||||
WKChannel? fromChannel = await WKIM.shared.channelManager
|
||||
.getChannel(msg.fromUID, WKChannelType.personal);
|
||||
if (fromChannel != null) {
|
||||
msg.setFrom(fromChannel);
|
||||
}
|
||||
if (msg.channelType == WKChannelType.group) {
|
||||
WKChannelMember? memberChannel = await WKIM.shared.channelMemberManager
|
||||
.getMember(msg.channelID, WKChannelType.group, msg.fromUID);
|
||||
if (memberChannel != null) {
|
||||
msg.setMemberOfFrom(memberChannel);
|
||||
}
|
||||
}
|
||||
WKIM.shared.messageManager.parsingMsg(msg);
|
||||
if (msg.isDeleted == 0 &&
|
||||
!msg.header.noPersist &&
|
||||
|
@ -580,8 +580,13 @@ class WKMessageManager {
|
||||
int tempOrderSeq = await MessageDB.shared
|
||||
.queryMaxOrderSeq(wkMsg.channelID, wkMsg.channelType);
|
||||
wkMsg.orderSeq = tempOrderSeq + 1;
|
||||
|
||||
wkMsg.content = _getSendPayload(wkMsg);
|
||||
wkMsg.setChannelInfo(channel);
|
||||
WKChannel? from = await WKIM.shared.channelManager
|
||||
.getChannel(wkMsg.fromUID, WKChannelType.personal);
|
||||
if (from == null) {
|
||||
wkMsg.setFrom(from!);
|
||||
}
|
||||
int row = await saveMsg(wkMsg);
|
||||
wkMsg.clientSeq = row;
|
||||
WKIM.shared.messageManager.setOnMsgInserted(wkMsg);
|
||||
|
@ -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.4.4
|
||||
version: 1.4.5
|
||||
homepage: https://github.com/WuKongIM/WuKongIMFlutterSDK
|
||||
|
||||
environment:
|
||||
|
Loading…
x
Reference in New Issue
Block a user