Brett 2025-06-04 16:10:48 +08:00
parent 7b65537e14
commit b96401de8a
15 changed files with 269 additions and 46 deletions

View File

@ -1,3 +1,7 @@
## 3.8.3+hotfix.7
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.7)
## 3.8.3+3 ## 3.8.3+3
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.3) - [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.3)

View File

@ -50,5 +50,5 @@ android {
} }
dependencies { dependencies {
implementation 'io.openim:core-sdk:3.8.3-patch3@aar' implementation 'io.openim:core-sdk:3.8.3-patch7@aar'
} }

View File

@ -35,14 +35,16 @@ public class FriendshipManager extends BaseManager {
public void getFriendApplicationListAsRecipient(MethodCall methodCall, MethodChannel.Result result) { public void getFriendApplicationListAsRecipient(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.getFriendApplicationListAsRecipient( Open_im_sdk.getFriendApplicationListAsRecipient(
new OnBaseListener(result, methodCall), new OnBaseListener(result, methodCall),
value(methodCall, "operationID") value(methodCall, "operationID"),
jsonValue(methodCall, "req")
); );
} }
public void getFriendApplicationListAsApplicant(MethodCall methodCall, MethodChannel.Result result) { public void getFriendApplicationListAsApplicant(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.getFriendApplicationListAsApplicant( Open_im_sdk.getFriendApplicationListAsApplicant(
new OnBaseListener(result, methodCall), new OnBaseListener(result, methodCall),
value(methodCall, "operationID") value(methodCall, "operationID"),
jsonValue(methodCall, "req")
); );
} }
@ -135,4 +137,12 @@ public class FriendshipManager extends BaseManager {
jsonValue(methodCall, "req") jsonValue(methodCall, "req")
); );
} }
public void getFriendApplicationUnhandledCount(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.getFriendApplicationUnhandledCount(
new OnBaseListener(result, methodCall),
value(methodCall, "operationID"),
jsonValue(methodCall, "req")
);
}
} }

View File

@ -126,14 +126,16 @@ public class GroupManager extends BaseManager {
public void getGroupApplicationListAsRecipient(MethodCall methodCall, MethodChannel.Result result) { public void getGroupApplicationListAsRecipient(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.getGroupApplicationListAsRecipient( Open_im_sdk.getGroupApplicationListAsRecipient(
new OnBaseListener(result, methodCall), new OnBaseListener(result, methodCall),
value(methodCall, "operationID") value(methodCall, "operationID"),
jsonValue(methodCall, "req")
); );
} }
public void getGroupApplicationListAsApplicant(MethodCall methodCall, MethodChannel.Result result) { public void getGroupApplicationListAsApplicant(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.getGroupApplicationListAsApplicant( Open_im_sdk.getGroupApplicationListAsApplicant(
new OnBaseListener(result, methodCall), new OnBaseListener(result, methodCall),
value(methodCall, "operationID") value(methodCall, "operationID"),
jsonValue(methodCall, "req")
); );
} }
@ -240,4 +242,11 @@ public class GroupManager extends BaseManager {
jsonValue(methodCall, "userIDs") jsonValue(methodCall, "userIDs")
); );
} }
public void getGroupApplicationUnhandledCount(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.getGroupApplicationUnhandledCount(new OnBaseListener(result, methodCall),
value(methodCall, "operationID"),
jsonValue(methodCall, "req")
);
}
} }

View File

@ -21,6 +21,7 @@ public class FriendshipManager: BaseServiceManager {
self["searchFriends"] = searchFriends self["searchFriends"] = searchFriends
self["setFriendListener"] = setFriendListener self["setFriendListener"] = setFriendListener
self["updateFriends"] = updateFriends self["updateFriends"] = updateFriends
self["getFriendApplicationUnhandledCount"] = getFriendApplicationUnhandledCount
} }
func acceptFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ func acceptFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
@ -48,11 +49,11 @@ public class FriendshipManager: BaseServiceManager {
} }
func getFriendApplicationListAsApplicant(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ func getFriendApplicationListAsApplicant(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
Open_im_sdkGetFriendApplicationListAsApplicant(BaseCallback(result: result), methodCall[string: "operationID"]) Open_im_sdkGetFriendApplicationListAsApplicant(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"])
} }
func getFriendApplicationListAsRecipient(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ func getFriendApplicationListAsRecipient(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
Open_im_sdkGetFriendApplicationListAsRecipient(BaseCallback(result: result), methodCall[string: "operationID"]) Open_im_sdkGetFriendApplicationListAsRecipient(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"])
} }
func getFriendList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ func getFriendList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
@ -87,6 +88,10 @@ public class FriendshipManager: BaseServiceManager {
func updateFriends(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ func updateFriends(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
Open_im_sdkUpdateFriends(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"]) Open_im_sdkUpdateFriends(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"])
} }
func getFriendApplicationUnhandledCount(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
Open_im_sdkGetFriendApplicationUnhandledCount(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"])
}
} }
public class FriendshipListener: NSObject, Open_im_sdk_callbackOnFriendshipListenerProtocol { public class FriendshipListener: NSObject, Open_im_sdk_callbackOnFriendshipListenerProtocol {

View File

@ -32,6 +32,7 @@ public class GroupManager: BaseServiceManager {
self["setGroupListener"] = setGroupListener self["setGroupListener"] = setGroupListener
self["setGroupMemberInfo"] = setGroupMemberInfo self["setGroupMemberInfo"] = setGroupMemberInfo
self["transferGroupOwner"] = transferGroupOwner self["transferGroupOwner"] = transferGroupOwner
self["getGroupApplicationUnhandledCount"] = getGroupApplicationUnhandledCount
} }
func acceptGroupApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult) { func acceptGroupApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
@ -55,11 +56,11 @@ public class GroupManager: BaseServiceManager {
} }
func getGroupApplicationListAsApplicant(methodCall: FlutterMethodCall, result: @escaping FlutterResult) { func getGroupApplicationListAsApplicant(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
Open_im_sdkGetGroupApplicationListAsApplicant(BaseCallback(result: result), methodCall[string: "operationID"]) Open_im_sdkGetGroupApplicationListAsApplicant(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"])
} }
func getGroupApplicationListAsRecipient(methodCall: FlutterMethodCall, result: @escaping FlutterResult) { func getGroupApplicationListAsRecipient(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
Open_im_sdkGetGroupApplicationListAsRecipient(BaseCallback(result: result), methodCall[string: "operationID"]) Open_im_sdkGetGroupApplicationListAsRecipient(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"])
} }
func getGroupMemberList(methodCall: FlutterMethodCall, result: @escaping FlutterResult) { func getGroupMemberList(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
@ -147,6 +148,10 @@ public class GroupManager: BaseServiceManager {
func transferGroupOwner(methodCall: FlutterMethodCall, result: @escaping FlutterResult) { func transferGroupOwner(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
Open_im_sdkTransferGroupOwner(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string: "userID"]) Open_im_sdkTransferGroupOwner(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string: "userID"])
} }
func getGroupApplicationUnhandledCount(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
Open_im_sdkGetGroupApplicationUnhandledCount(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "req"])
}
} }
public class GroupListener: NSObject, Open_im_sdk_callbackOnGroupListenerProtocol { public class GroupListener: NSObject, Open_im_sdk_callbackOnGroupListenerProtocol {

View File

@ -17,7 +17,7 @@ A new Flutter project.
s.dependency 'Flutter' s.dependency 'Flutter'
s.platform = :ios, '11.0' s.platform = :ios, '11.0'
s.dependency 'OpenIMSDKCore','3.8.3+3' s.dependency 'OpenIMSDKCore','3.8.3-hotfix.7'
s.static_framework = true s.static_framework = true
s.library = 'resolv' s.library = 'resolv'

View File

@ -4,8 +4,6 @@ import 'dart:developer';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
import '../models/update_req.dart';
class ConversationManager { class ConversationManager {
MethodChannel _channel; MethodChannel _channel;
late OnConversationListener listener; late OnConversationListener listener;

View File

@ -3,8 +3,6 @@ import 'dart:async';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
import '../models/update_req.dart';
class FriendshipManager { class FriendshipManager {
MethodChannel _channel; MethodChannel _channel;
late OnFriendshipListener listener; late OnFriendshipListener listener;
@ -51,22 +49,36 @@ class FriendshipManager {
})); }));
/// Get Friend Requests Sent to Me /// Get Friend Requests Sent to Me
Future<List<FriendApplicationInfo>> getFriendApplicationListAsRecipient({String? operationID}) => _channel Future<List<FriendApplicationInfo>> getFriendApplicationListAsRecipient(
.invokeMethod( {GetFriendApplicationListAsRecipientReq? req, String? operationID}) {
'getFriendApplicationListAsRecipient', if (req != null && req.offset > 0) {
_buildParam({ assert(req.count > 0, 'count must be greater than 0');
"operationID": Utils.checkOperationID(operationID), }
})) return _channel
.then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v))); .invokeMethod(
'getFriendApplicationListAsRecipient',
_buildParam({
'req': req?.toJson() ?? {},
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v)));
}
/// Get Friend Requests Sent by Me /// Get Friend Requests Sent by Me
Future<List<FriendApplicationInfo>> getFriendApplicationListAsApplicant({String? operationID}) => _channel Future<List<FriendApplicationInfo>> getFriendApplicationListAsApplicant(
.invokeMethod( {GetFriendApplicationListAsApplicantReq? req, String? operationID}) {
'getFriendApplicationListAsApplicant', if (req != null && req.offset > 0) {
_buildParam({ assert(req.count > 0, 'count must be greater than 0');
"operationID": Utils.checkOperationID(operationID), }
})) return _channel
.then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v))); .invokeMethod(
'getFriendApplicationListAsApplicant',
_buildParam({
'req': req?.toJson() ?? {},
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v)));
}
/// Get Friend List, including friends who have been put into the blacklist /// Get Friend List, including friends who have been put into the blacklist
Future<List<FriendInfo>> getFriendList({ Future<List<FriendInfo>> getFriendList({

View File

@ -2,7 +2,6 @@ import 'dart:developer';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
import 'package:flutter_openim_sdk/src/models/set_group_member_info.dart';
class GroupManager { class GroupManager {
MethodChannel _channel; MethodChannel _channel;
@ -257,22 +256,41 @@ class GroupManager {
})); }));
/// Handle group membership applications received as a group owner or administrator /// Handle group membership applications received as a group owner or administrator
Future<List<GroupApplicationInfo>> getGroupApplicationListAsRecipient({String? operationID}) => _channel Future<List<GroupApplicationInfo>> getGroupApplicationListAsRecipient({
.invokeMethod( GetGroupApplicationListAsRecipientReq? req,
'getGroupApplicationListAsRecipient', String? operationID,
_buildParam({ }) {
'operationID': Utils.checkOperationID(operationID), if (req != null && req.offset > 0) {
})) assert(req.count > 0, 'count must be greater than 0');
.then((value) => Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map))); }
return _channel
.invokeMethod(
'getGroupApplicationListAsRecipient',
_buildParam({
'req': req?.toJson() ?? {},
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map)));
}
/// Get the list of group membership applications sent by the user /// Get the list of group membership applications sent by the user
Future<List<GroupApplicationInfo>> getGroupApplicationListAsApplicant({String? operationID}) => _channel Future<List<GroupApplicationInfo>> getGroupApplicationListAsApplicant({
.invokeMethod( GetGroupApplicationListAsApplicantReq? req,
'getGroupApplicationListAsApplicant', String? operationID,
_buildParam({ }) {
'operationID': Utils.checkOperationID(operationID), if (req != null && req.offset > 0) {
})) assert(req.count > 0, 'count must be greater than 0');
.then((value) => Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map))); }
return _channel
.invokeMethod(
'getGroupApplicationListAsApplicant',
_buildParam({
'req': req?.toJson() ?? {},
"operationID": Utils.checkOperationID(operationID),
}))
.then((value) => Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map)));
}
/// Accept a group membership application as an administrator or group owner /// Accept a group membership application as an administrator or group owner
/// Note: Membership applications require approval from administrators or the group. /// Note: Membership applications require approval from administrators or the group.

View File

@ -422,3 +422,90 @@ class GroupInviteResult {
return data; return data;
} }
} }
class GetGroupApplicationListAsRecipientReq {
final List<String> groupIDs;
final List<int> handleResults;
final int offset;
final int count;
GetGroupApplicationListAsRecipientReq({
this.groupIDs = const [],
this.handleResults = const [],
required this.offset,
required this.count,
});
GetGroupApplicationListAsRecipientReq.fromJson(Map<String, dynamic> json)
: groupIDs = json['groupIDs'] == null ? [] : List<String>.from(json['groupIDs'].map((x) => x)),
handleResults = json['handleResults'] == null ? [] : List<int>.from(json['handleResults'].map((x) => x)),
offset = json['offset'],
count = json['count'];
Map<String, dynamic> toJson() {
final data = <String, dynamic>{};
data['groupIDs'] = groupIDs;
data['handleResults'] = handleResults;
data['offset'] = offset;
data['count'] = count;
return data;
}
@override
String toString() {
return 'GetGroupApplicationListAsRecipientReq{groupIDs: $groupIDs, handleResults: $handleResults, offset: $offset, count: $count}';
}
}
class GetGroupApplicationListAsApplicantReq {
final List<String> groupIDs;
final List<int> handleResults;
final int offset;
final int count;
GetGroupApplicationListAsApplicantReq({
this.groupIDs = const [],
this.handleResults = const [],
required this.offset,
required this.count,
});
GetGroupApplicationListAsApplicantReq.fromJson(Map<String, dynamic> json)
: groupIDs = json['groupIDs'] == null ? [] : List<String>.from(json['groupIDs'].map((x) => x)),
handleResults = json['handleResults'] == null ? [] : List<int>.from(json['handleResults'].map((x) => x)),
offset = json['offset'],
count = json['count'];
Map<String, dynamic> toJson() {
final data = <String, dynamic>{};
data['groupIDs'] = groupIDs;
data['handleResults'] = handleResults;
data['offset'] = offset;
data['count'] = count;
return data;
}
@override
String toString() {
return 'GetGroupApplicationListAsApplicantReq{groupIDs: $groupIDs, handleResults: $handleResults, offset: $offset, count: $count}';
}
}
class GetGroupApplicationUnhandledCountReq {
final int time;
GetGroupApplicationUnhandledCountReq({this.time = 0});
GetGroupApplicationUnhandledCountReq.fromJson(Map<String, dynamic> json) : time = json['time'];
Map<String, dynamic> toJson() {
final data = <String, dynamic>{};
data['time'] = time;
return data;
}
@override
String toString() {
return 'GetGroupApplicationUnhandledCountReq{time: $time}';
}
}

View File

@ -124,6 +124,6 @@ class SearchFriendsInfo extends FriendInfo {
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final data = super.toJson(); final data = super.toJson();
data['relationship'] = this.relationship; data['relationship'] = this.relationship;
return data ?? {}; return data;
} }
} }

View File

@ -423,3 +423,78 @@ class UserStatusInfo {
return data; return data;
} }
} }
class GetFriendApplicationListAsRecipientReq {
final List<int> handleResults;
final int offset;
final int count;
GetFriendApplicationListAsRecipientReq({
this.handleResults = const [],
required this.offset,
required this.count,
});
GetFriendApplicationListAsRecipientReq.fromJson(Map<String, dynamic> json)
: handleResults = json['handleResults'] == null ? [] : List<int>.from(json['handleResults'].map((x) => x)),
offset = json['offset'],
count = json['count'];
Map<String, dynamic> toJson() {
final data = <String, dynamic>{};
data['handleResults'] = handleResults;
data['offset'] = offset;
data['count'] = count;
return data;
}
@override
String toString() {
return 'GetFriendApplicationListAsRecipientReq{handleResults: $handleResults, offset: $offset, count: $count}';
}
}
class GetFriendApplicationListAsApplicantReq {
final int offset;
final int count;
GetFriendApplicationListAsApplicantReq({
required this.offset,
required this.count,
});
GetFriendApplicationListAsApplicantReq.fromJson(Map<String, dynamic> json)
: offset = json['offset'],
count = json['count'];
Map<String, dynamic> toJson() {
final data = <String, dynamic>{};
data['offset'] = offset;
data['count'] = count;
return data;
}
@override
String toString() {
return 'GetFriendApplicationListAsApplicantReq{offset: $offset, count: $count}';
}
}
class GetFriendApplicationUnhandledCountReq {
final int time;
GetFriendApplicationUnhandledCountReq({this.time = 0});
GetFriendApplicationUnhandledCountReq.fromJson(Map<String, dynamic> json) : time = json['time'];
Map<String, dynamic> toJson() {
final data = <String, dynamic>{};
data['time'] = time;
return data;
}
@override
String toString() {
return 'GetSelfUnhandledApplyCountReq{time: $time}';
}
}

View File

@ -2,7 +2,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
class OpenIM { class OpenIM {
static const version = '3.8.3+hotfix.3.1'; static const version = '3.8.3+hotfix.7';
static const _channel = MethodChannel('flutter_openim_sdk'); static const _channel = MethodChannel('flutter_openim_sdk');

View File

@ -1,6 +1,6 @@
name: flutter_openim_sdk name: flutter_openim_sdk
description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source. description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source.
version: 3.8.3+hotfix.3.1 version: 3.8.3+hotfix.7
homepage: https://www.openim.io homepage: https://www.openim.io
repository: https://github.com/openimsdk/open-im-sdk-flutter repository: https://github.com/openimsdk/open-im-sdk-flutter