Skip to content

Commit e90aa17

Browse files
authored
Merge pull request #463 from dujiepeng/flutter2
Flutter2
2 parents 991b059 + 67e4706 commit e90aa17

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* 支持gcm推送点击
44

55
## 3.8.3+2
6-
增加群组已读回执;
7-
不在提供EMContact类,直接返回String类型username;
6+
* 增加群组已读回执;
7+
* 不在提供EMContact类,直接返回String类型username;
88

99
## 3.8.3
1010
* 增加用户属性;

ios/Classes/EMMessage+Flutter.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ + (EMMessage *)fromJson:(NSDictionary *)aJson
4949
msg.isDeliverAcked = [aJson[@"hasDeliverAck"] boolValue];
5050
msg.isRead = [aJson[@"hasRead"] boolValue];
5151
msg.isNeedGroupAck = [aJson[@"needGroupAck"] boolValue];
52+
// read only
53+
// msg.groupAckCount = [aJson[@"groupAckCount"] intValue]
5254
msg.ext = aJson[@"attributes"];
5355
return msg;
5456
}
@@ -65,6 +67,7 @@ - (NSDictionary *)toJson
6567
ret[@"hasReadAck"] = @(self.isReadAcked);
6668
ret[@"needGroupAck"] = @(self.isNeedGroupAck);
6769
ret[@"serverTime"] = @(self.timestamp);
70+
ret[@"groupAckCount"] = @(self.groupAckCount);
6871
ret[@"attributes"] = self.ext ?: @{};
6972
ret[@"localTime"] = @(self.localTime);
7073
ret[@"status"] = @([self statusToInt:self.status]);

lib/src/em_chat_room_manager.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ class EMChatRoomManager {
220220
}
221221

222222
/// @nodoc 获取聊天室成员列表,[roomId] [cursor] [pageSize]
223-
Future<EMCursorResult<EMChatRoom>> fetchChatRoomMembers(
223+
Future<EMCursorResult<String?>> fetchChatRoomMembers(
224224
String roomId, {
225225
String cursor = '',
226226
int pageSize = 200,
@@ -229,7 +229,7 @@ class EMChatRoomManager {
229229
Map result =
230230
await _channel.invokeMethod(EMSDKMethod.fetchChatRoomMembers, req);
231231
EMError.hasErrorFromResult(result);
232-
return EMCursorResult<EMChatRoom>.fromJson(
232+
return EMCursorResult<String?>.fromJson(
233233
result[EMSDKMethod.fetchChatRoomMembers],
234234
dataItemCallback: (obj) => obj);
235235
}

lib/src/models/em_message.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ class EMMessage {
394394
..hasRead = map.boolValue('hasRead')
395395
..hasReadAck = map.boolValue('hasReadAck')
396396
..needGroupAck = map.boolValue('needGroupAck')
397-
..groupAckCount = map["groupAckCount"] as int
397+
..groupAckCount = map["groupAckCount"] as int? ?? 0
398398
..hasDeliverAck = map.boolValue('hasDeliverAck')
399399
.._msgId = map['msgId'] as String?
400400
..conversationId = map['conversationId'] as String?

0 commit comments

Comments
 (0)