Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett committed Mar 6, 2024
1 parent 9b11686 commit 44fe1a3
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 18 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Original file line number Diff line number Diff line change
Expand Up @@ -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")
);
}

Expand Down Expand Up @@ -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")
);
}

Expand Down
4 changes: 2 additions & 2 deletions ios/Classes/Module/MessageManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -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){
Expand Down
2 changes: 1 addition & 1 deletion ios/flutter_openim_sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
19 changes: 10 additions & 9 deletions lib/src/manager/im_message_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class MessageManager {
required OfflinePushInfo offlinePushInfo,
String? userID,
String? groupID,
bool isOnlineOnly = false,
String? operationID,
}) =>
_channel
Expand All @@ -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)));
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -679,6 +677,7 @@ class MessageManager {
required OfflinePushInfo offlinePushInfo,
String? userID,
String? groupID,
bool isOnlineOnly = false,
String? operationID,
}) =>
_channel
Expand All @@ -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)));
Expand Down Expand Up @@ -779,7 +779,8 @@ class MessageManager {
}));
}

Future setAppBadge(int count, {
Future setAppBadge(
int count, {
String? operationID,
}) {
return _channel.invokeMethod(
Expand Down
2 changes: 1 addition & 1 deletion lib/src/openim.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 44fe1a3

Please sign in to comment.