diff --git a/CHANGELOG.md b/CHANGELOG.md index 52313db..44090a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,11 @@ +## 3.5.1 + +- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.5.1) + ## 3.5.1-alpha.7 - [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.5.1-alpha.7) -- + ## 3.5.1-alpha.2 - [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.5.1-alpha.2) diff --git a/android/build.gradle b/android/build.gradle index b3a4bcc..b5bf40f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -52,5 +52,5 @@ android { dependencies { // 本地依赖,现将aar复制到libs/io/openim/core-sdk/0.0.1/ 下,命名core-sdk-0.0.1.aar // implementation 'io.openim:core-sdk:0.0.1@aar' - implementation 'io.openim:core-sdk:3.5.1-alpha.8@aar' + implementation 'io.openim:core-sdk:3.5.1@aar' } \ No newline at end of file diff --git a/android/src/main/java/io/openim/flutter_openim_sdk/manager/MessageManager.java b/android/src/main/java/io/openim/flutter_openim_sdk/manager/MessageManager.java index 6240a60..ffdd01d 100644 --- a/android/src/main/java/io/openim/flutter_openim_sdk/manager/MessageManager.java +++ b/android/src/main/java/io/openim/flutter_openim_sdk/manager/MessageManager.java @@ -27,7 +27,8 @@ public void sendMessage(MethodCall methodCall, MethodChannel.Result result) { jsonValue(methodCall, "message"), value(methodCall, "userID"), value(methodCall, "groupID"), - jsonValue(methodCall, "offlinePushInfo") + jsonValue(methodCall, "offlinePushInfo"), + value(methodCall, "isOnlineOnly") ); } @@ -338,7 +339,8 @@ public void sendMessageNotOss(MethodCall methodCall, MethodChannel.Result result jsonValue(methodCall, "message"), value(methodCall, "userID"), value(methodCall, "groupID"), - jsonValue(methodCall, "offlinePushInfo") + jsonValue(methodCall, "offlinePushInfo"), + value(methodCall, "isOnlineOnly") ); } diff --git a/ios/Classes/Module/MessageManager.swift b/ios/Classes/Module/MessageManager.swift index c7ef279..e560d30 100644 --- a/ios/Classes/Module/MessageManager.swift +++ b/ios/Classes/Module/MessageManager.swift @@ -65,7 +65,7 @@ public class MessageManager: BaseServiceManager { func sendMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ let sendMsgProgressListener: SendMsgProgressListener = SendMsgProgressListener(channel: channel,result: result,methodCall: methodCall) Open_im_sdkSendMessage(sendMsgProgressListener, methodCall[string: "operationID"], methodCall[jsonString: "message"], methodCall[string: "userID"], - methodCall[string: "groupID"], methodCall[jsonString: "offlinePushInfo"]) + methodCall[string: "groupID"], methodCall[jsonString: "offlinePushInfo"], methodCall[bool: "isOnlineOnly"]) } func revokeMessage(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ @@ -228,7 +228,7 @@ public class MessageManager: BaseServiceManager { func sendMessageNotOss(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ let sendMsgProgressListener: SendMsgProgressListener = SendMsgProgressListener(channel: channel,result: result,methodCall: methodCall) Open_im_sdkSendMessageNotOss(sendMsgProgressListener, methodCall[string: "operationID"], methodCall[jsonString: "message"], methodCall[string: "userID"], - methodCall[string: "groupID"], methodCall[jsonString: "offlinePushInfo"]) + methodCall[string: "groupID"], methodCall[jsonString: "offlinePushInfo"], methodCall[bool: "isOnlineOnly"]) } func createImageMessageByURL(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ diff --git a/ios/flutter_openim_sdk.podspec b/ios/flutter_openim_sdk.podspec index 9734ddf..e3e492b 100644 --- a/ios/flutter_openim_sdk.podspec +++ b/ios/flutter_openim_sdk.podspec @@ -17,7 +17,7 @@ A new Flutter project. s.dependency 'Flutter' s.platform = :ios, '11.0' - s.dependency 'OpenIMSDKCore','3.5.1-alpha.8' + s.dependency 'OpenIMSDKCore','3.5.1' s.static_framework = true s.library = 'resolv' diff --git a/lib/src/manager/im_message_manager.dart b/lib/src/manager/im_message_manager.dart index e608645..29d6a6f 100644 --- a/lib/src/manager/im_message_manager.dart +++ b/lib/src/manager/im_message_manager.dart @@ -36,6 +36,7 @@ class MessageManager { required OfflinePushInfo offlinePushInfo, String? userID, String? groupID, + bool isOnlineOnly = false, String? operationID, }) => _channel @@ -46,6 +47,7 @@ class MessageManager { 'offlinePushInfo': offlinePushInfo.toJson(), 'userID': userID ?? '', 'groupID': groupID ?? '', + 'isOnlineOnly': isOnlineOnly, 'operationID': Utils.checkOperationID(operationID), })) .then((value) => Utils.toObj(value, (map) => Message.fromJson(map))); @@ -529,8 +531,7 @@ class MessageManager { }, 'operationID': Utils.checkOperationID(operationID), })) - .then((value) => - Utils.toObj(value, (map) => SearchResult.fromJson(map))); + .then((value) => Utils.toObj(value, (map) => SearchResult.fromJson(map))); /// Revoke a message /// [message] The message to be revoked @@ -585,8 +586,7 @@ class MessageManager { 'lastMinSeq': lastMinSeq ?? 0, 'operationID': Utils.checkOperationID(operationID), })) - .then((value) => - Utils.toObj(value, (map) => AdvancedMessage.fromJson(map))); + .then((value) => Utils.toObj(value, (map) => AdvancedMessage.fromJson(map))); /// Get chat history (newly received chat history after startMsg). Used for locating a specific message in global search and then fetching messages received after that message. /// [conversationID] Conversation ID, can be used for querying notifications @@ -609,8 +609,7 @@ class MessageManager { 'lastMinSeq': lastMinSeq ?? 0, 'operationID': Utils.checkOperationID(operationID), })) - .then((value) => - Utils.toObj(value, (map) => AdvancedMessage.fromJson(map))); + .then((value) => Utils.toObj(value, (map) => AdvancedMessage.fromJson(map))); /// Find message details /// [conversationID] Conversation ID @@ -626,8 +625,7 @@ class MessageManager { 'searchParams': searchParams.map((e) => e.toJson()).toList(), 'operationID': Utils.checkOperationID(operationID), })) - .then((value) => - Utils.toObj(value, (map) => SearchResult.fromJson(map))); + .then((value) => Utils.toObj(value, (map) => SearchResult.fromJson(map))); /// Rich text message /// [text] Input content @@ -679,6 +677,7 @@ class MessageManager { required OfflinePushInfo offlinePushInfo, String? userID, String? groupID, + bool isOnlineOnly = false, String? operationID, }) => _channel @@ -689,6 +688,7 @@ class MessageManager { 'offlinePushInfo': offlinePushInfo.toJson(), 'userID': userID ?? '', 'groupID': groupID ?? '', + 'isOnlineOnly': isOnlineOnly, 'operationID': Utils.checkOperationID(operationID), })) .then((value) => Utils.toObj(value, (map) => Message.fromJson(map))); @@ -779,7 +779,8 @@ class MessageManager { })); } - Future setAppBadge(int count, { + Future setAppBadge( + int count, { String? operationID, }) { return _channel.invokeMethod( diff --git a/lib/src/openim.dart b/lib/src/openim.dart index bfa90fc..508add1 100644 --- a/lib/src/openim.dart +++ b/lib/src/openim.dart @@ -2,7 +2,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; class OpenIM { - static const version = '3.5.1-alpha.8'; + static const version = '3.5.1'; static const _channel = const MethodChannel('flutter_openim_sdk'); diff --git a/pubspec.yaml b/pubspec.yaml index fc84453..c0f6ca2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_openim_sdk description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source. -version: 3.5.1-alpha.8 +version: 3.5.1 homepage: https://www.openim.io repository: https://github.com/openimsdk/open-im-sdk-flutter