This commit is contained in:
parent
7b65537e14
commit
b96401de8a
@ -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
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.3)
|
||||
|
||||
@ -50,5 +50,5 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'io.openim:core-sdk:3.8.3-patch3@aar'
|
||||
implementation 'io.openim:core-sdk:3.8.3-patch7@aar'
|
||||
}
|
||||
@ -35,14 +35,16 @@ public class FriendshipManager extends BaseManager {
|
||||
public void getFriendApplicationListAsRecipient(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getFriendApplicationListAsRecipient(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "req")
|
||||
);
|
||||
}
|
||||
|
||||
public void getFriendApplicationListAsApplicant(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getFriendApplicationListAsApplicant(
|
||||
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")
|
||||
);
|
||||
}
|
||||
|
||||
public void getFriendApplicationUnhandledCount(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getFriendApplicationUnhandledCount(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "req")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,14 +126,16 @@ public class GroupManager extends BaseManager {
|
||||
public void getGroupApplicationListAsRecipient(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupApplicationListAsRecipient(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "req")
|
||||
);
|
||||
}
|
||||
|
||||
public void getGroupApplicationListAsApplicant(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupApplicationListAsApplicant(
|
||||
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")
|
||||
);
|
||||
}
|
||||
|
||||
public void getGroupApplicationUnhandledCount(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupApplicationUnhandledCount(new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "req")
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -21,6 +21,7 @@ public class FriendshipManager: BaseServiceManager {
|
||||
self["searchFriends"] = searchFriends
|
||||
self["setFriendListener"] = setFriendListener
|
||||
self["updateFriends"] = updateFriends
|
||||
self["getFriendApplicationUnhandledCount"] = getFriendApplicationUnhandledCount
|
||||
}
|
||||
|
||||
func acceptFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
@ -48,11 +49,11 @@ public class FriendshipManager: BaseServiceManager {
|
||||
}
|
||||
|
||||
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){
|
||||
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){
|
||||
@ -87,6 +88,10 @@ public class FriendshipManager: BaseServiceManager {
|
||||
func updateFriends(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
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 {
|
||||
|
||||
@ -32,6 +32,7 @@ public class GroupManager: BaseServiceManager {
|
||||
self["setGroupListener"] = setGroupListener
|
||||
self["setGroupMemberInfo"] = setGroupMemberInfo
|
||||
self["transferGroupOwner"] = transferGroupOwner
|
||||
self["getGroupApplicationUnhandledCount"] = getGroupApplicationUnhandledCount
|
||||
}
|
||||
|
||||
func acceptGroupApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
@ -55,11 +56,11 @@ public class GroupManager: BaseServiceManager {
|
||||
}
|
||||
|
||||
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) {
|
||||
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) {
|
||||
@ -147,6 +148,10 @@ public class GroupManager: BaseServiceManager {
|
||||
func transferGroupOwner(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
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 {
|
||||
|
||||
@ -17,7 +17,7 @@ A new Flutter project.
|
||||
s.dependency 'Flutter'
|
||||
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.library = 'resolv'
|
||||
|
||||
|
||||
@ -4,8 +4,6 @@ import 'dart:developer';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
|
||||
import '../models/update_req.dart';
|
||||
|
||||
class ConversationManager {
|
||||
MethodChannel _channel;
|
||||
late OnConversationListener listener;
|
||||
|
||||
@ -3,8 +3,6 @@ import 'dart:async';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
|
||||
import '../models/update_req.dart';
|
||||
|
||||
class FriendshipManager {
|
||||
MethodChannel _channel;
|
||||
late OnFriendshipListener listener;
|
||||
@ -51,22 +49,36 @@ class FriendshipManager {
|
||||
}));
|
||||
|
||||
/// Get Friend Requests Sent to Me
|
||||
Future<List<FriendApplicationInfo>> getFriendApplicationListAsRecipient({String? operationID}) => _channel
|
||||
.invokeMethod(
|
||||
'getFriendApplicationListAsRecipient',
|
||||
_buildParam({
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v)));
|
||||
Future<List<FriendApplicationInfo>> getFriendApplicationListAsRecipient(
|
||||
{GetFriendApplicationListAsRecipientReq? req, String? operationID}) {
|
||||
if (req != null && req.offset > 0) {
|
||||
assert(req.count > 0, 'count must be greater than 0');
|
||||
}
|
||||
return _channel
|
||||
.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
|
||||
Future<List<FriendApplicationInfo>> getFriendApplicationListAsApplicant({String? operationID}) => _channel
|
||||
.invokeMethod(
|
||||
'getFriendApplicationListAsApplicant',
|
||||
_buildParam({
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v)));
|
||||
Future<List<FriendApplicationInfo>> getFriendApplicationListAsApplicant(
|
||||
{GetFriendApplicationListAsApplicantReq? req, String? operationID}) {
|
||||
if (req != null && req.offset > 0) {
|
||||
assert(req.count > 0, 'count must be greater than 0');
|
||||
}
|
||||
return _channel
|
||||
.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
|
||||
Future<List<FriendInfo>> getFriendList({
|
||||
|
||||
@ -2,7 +2,6 @@ import 'dart:developer';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
import 'package:flutter_openim_sdk/src/models/set_group_member_info.dart';
|
||||
|
||||
class GroupManager {
|
||||
MethodChannel _channel;
|
||||
@ -257,22 +256,41 @@ class GroupManager {
|
||||
}));
|
||||
|
||||
/// Handle group membership applications received as a group owner or administrator
|
||||
Future<List<GroupApplicationInfo>> getGroupApplicationListAsRecipient({String? operationID}) => _channel
|
||||
.invokeMethod(
|
||||
'getGroupApplicationListAsRecipient',
|
||||
_buildParam({
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map)));
|
||||
Future<List<GroupApplicationInfo>> getGroupApplicationListAsRecipient({
|
||||
GetGroupApplicationListAsRecipientReq? req,
|
||||
String? operationID,
|
||||
}) {
|
||||
if (req != null && req.offset > 0) {
|
||||
assert(req.count > 0, 'count must be greater than 0');
|
||||
}
|
||||
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
|
||||
Future<List<GroupApplicationInfo>> getGroupApplicationListAsApplicant({String? operationID}) => _channel
|
||||
.invokeMethod(
|
||||
'getGroupApplicationListAsApplicant',
|
||||
_buildParam({
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map)));
|
||||
Future<List<GroupApplicationInfo>> getGroupApplicationListAsApplicant({
|
||||
GetGroupApplicationListAsApplicantReq? req,
|
||||
String? operationID,
|
||||
}) {
|
||||
if (req != null && req.offset > 0) {
|
||||
assert(req.count > 0, 'count must be greater than 0');
|
||||
}
|
||||
|
||||
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
|
||||
/// Note: Membership applications require approval from administrators or the group.
|
||||
|
||||
@ -422,3 +422,90 @@ class GroupInviteResult {
|
||||
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}';
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,6 +124,6 @@ class SearchFriendsInfo extends FriendInfo {
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = super.toJson();
|
||||
data['relationship'] = this.relationship;
|
||||
return data ?? {};
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -423,3 +423,78 @@ class UserStatusInfo {
|
||||
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}';
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
|
||||
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');
|
||||
|
||||
|
||||
@ -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.8.3+hotfix.3.1
|
||||
version: 3.8.3+hotfix.7
|
||||
homepage: https://www.openim.io
|
||||
repository: https://github.com/openimsdk/open-im-sdk-flutter
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user