main
hrxiang 2 years ago
parent ba3767da42
commit 025487fbf3
  1. 3
      CHANGELOG.md
  2. 2
      lib/src/manager/im_manager.dart
  3. 10
      lib/src/models/message.dart

@ -3,6 +3,9 @@
- Add onRecvMessageExtensionsAdded method for OnAdvancedMsgListener - Add onRecvMessageExtensionsAdded method for OnAdvancedMsgListener
- Add addMessageReactionExtensions method for MessageManager - Add addMessageReactionExtensions method for MessageManager
- Add getMessageListSomeReactionExtensions method for MessageManager - Add getMessageListSomeReactionExtensions method for MessageManager
- Add isExternal field for MessageManager
- Add isReact method field MessageManager
- Add params isExternalExtensions for initSDK
## 2.3.5+1 ## 2.3.5+1

@ -382,6 +382,7 @@ class IMManager {
String? encryptionKey, String? encryptionKey,
bool enabledEncryption = false, bool enabledEncryption = false,
bool enabledCompression = false, bool enabledCompression = false,
bool isExternalExtensions = false,
String? operationID, String? operationID,
}) { }) {
this._connectListener = listener; this._connectListener = listener;
@ -399,6 +400,7 @@ class IMManager {
"encryption_key": encryptionKey, "encryption_key": encryptionKey,
"is_need_encryption": enabledEncryption, "is_need_encryption": enabledEncryption,
"is_compression ": enabledCompression, "is_compression ": enabledCompression,
"is_external_extensions": isExternalExtensions,
"operationID": Utils.checkOperationID(operationID), "operationID": Utils.checkOperationID(operationID),
}, },
)); ));

@ -105,6 +105,10 @@ class Message {
/// ///
AttachedInfoElem? attachedInfoElem; AttachedInfoElem? attachedInfoElem;
bool? isReact;
bool? isExternal;
Message({ Message({
this.clientMsgID, this.clientMsgID,
this.serverMsgID, this.serverMsgID,
@ -140,6 +144,8 @@ class Message {
this.notificationElem, this.notificationElem,
this.faceElem, this.faceElem,
this.attachedInfoElem, this.attachedInfoElem,
this.isExternal,
this.isReact,
}); });
Message.fromJson(Map<String, dynamic> json) { Message.fromJson(Map<String, dynamic> json) {
@ -200,6 +206,8 @@ class Message {
? AttachedInfoElem.fromJson(json['attachedInfoElem']) ? AttachedInfoElem.fromJson(json['attachedInfoElem'])
: null; : null;
hasReadTime = json['hasReadTime'] ?? attachedInfoElem?.hasReadTime; hasReadTime = json['hasReadTime'] ?? attachedInfoElem?.hasReadTime;
isExternal = json['isExternal'];
isReact = json['isReact'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -238,6 +246,8 @@ class Message {
data['notificationElem'] = this.notificationElem?.toJson(); data['notificationElem'] = this.notificationElem?.toJson();
data['faceElem'] = this.faceElem?.toJson(); data['faceElem'] = this.faceElem?.toJson();
data['attachedInfoElem'] = this.attachedInfoElem?.toJson(); data['attachedInfoElem'] = this.attachedInfoElem?.toJson();
data['isExternal'] = this.isExternal;
data['isReact'] = this.isReact;
return data; return data;
} }

Loading…
Cancel
Save