[Super Group]2.3.0
This commit is contained in:
parent
18f099c437
commit
72111053bd
@ -17,6 +17,7 @@
|
||||
- Add joinSource field for GroupApplicationInfo
|
||||
- Add inviterUserID field for GroupApplicationInfo
|
||||
- Add getAdvancedHistoryMessageList method for MessageManager
|
||||
- Add searchGroupMembers method for GroupManager
|
||||
|
||||
## 2.2.0
|
||||
|
||||
|
@ -41,5 +41,5 @@ android {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
implementation 'io.openim:core-sdk:2.3.0-rc1@aar'
|
||||
implementation 'io.openim:core-sdk:2.3.0@aar'
|
||||
}
|
@ -243,4 +243,11 @@ public class GroupManager extends BaseManager {
|
||||
value(methodCall, "groupID")
|
||||
);
|
||||
}
|
||||
|
||||
public void searchGroupMembers(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.searchGroupMembers(new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "searchParam")
|
||||
);
|
||||
}
|
||||
}
|
@ -60,7 +60,7 @@ public class OrganizationManager extends BaseManager {
|
||||
Open_im_sdk.searchOrganization(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "searchParams"),
|
||||
jsonValue(methodCall, "searchParam"),
|
||||
int2long(methodCall, "offset"),
|
||||
int2long(methodCall, "count")
|
||||
);
|
||||
|
@ -32,6 +32,7 @@ public class GroupManager: BaseServiceManager {
|
||||
self["setGroupLookMemberInfo"] = setGroupLookMemberInfo
|
||||
self["setGroupApplyMemberFriend"] = setGroupApplyMemberFriend
|
||||
self["getGroupMemberOwnerAndAdmin"] = getGroupMemberOwnerAndAdmin
|
||||
self["searchGroupMembers"] = searchGroupMembers
|
||||
}
|
||||
|
||||
func setGroupListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
@ -145,6 +146,10 @@ public class GroupManager: BaseServiceManager {
|
||||
func getGroupMemberOwnerAndAdmin(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetGroupMemberOwnerAndAdmin(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"])
|
||||
}
|
||||
|
||||
func searchGroupMembers(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSearchGroupMembers(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"])
|
||||
}
|
||||
}
|
||||
|
||||
public class GroupListener: NSObject, Open_im_sdk_callbackOnGroupListenerProtocol {
|
||||
|
@ -45,6 +45,7 @@ public class MessageManager: BaseServiceManager {
|
||||
self["clearGroupHistoryMessageFromLocalAndSvr"] = clearGroupHistoryMessageFromLocalAndSvr
|
||||
self["getHistoryMessageListReverse"] = getHistoryMessageListReverse
|
||||
self["newRevokeMessage"] = newRevokeMessage
|
||||
self["getAdvancedHistoryMessageList"] = getAdvancedHistoryMessageList
|
||||
}
|
||||
|
||||
func setAdvancedMsgListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
@ -219,6 +220,9 @@ public class MessageManager: BaseServiceManager {
|
||||
Open_im_sdkNewRevokeMessage(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||
}
|
||||
|
||||
func getAdvancedHistoryMessageList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetAdvancedHistoryMessageList(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||
}
|
||||
}
|
||||
|
||||
public class SendMsgProgressListener: NSObject, Open_im_sdk_callbackSendMsgCallBackProtocol {
|
||||
|
@ -40,7 +40,7 @@ public class OrganizationManager: BaseServiceManager {
|
||||
}
|
||||
|
||||
func searchOrganization(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkSearchOrganization(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParams"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||
Open_im_sdkSearchOrganization(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ class GroupManager {
|
||||
|
||||
/// 分页获取组成员列表
|
||||
/// [groupId] 群ID
|
||||
/// [filter] 过滤成员 1普通成员, 2群主,3管理员,0 所有
|
||||
/// [filter] 过滤成员 0所有,1普通成员, 2群主,3管理员,4管理员+普通成员
|
||||
/// [offset] 开始下标
|
||||
/// [count] 总数
|
||||
Future<List<GroupMembersInfo>> getGroupMemberList({
|
||||
@ -102,7 +102,7 @@ class GroupManager {
|
||||
|
||||
/// 分页获取组成员列表
|
||||
/// [groupId] 群ID
|
||||
/// [filter] 过滤成员 1普通成员, 2群主,3管理员,0所有
|
||||
/// [filter] 过滤成员 0所有,1普通成员, 2群主,3管理员,4管理员+普通成员
|
||||
/// [offset] 开始下标
|
||||
/// [count] 总数
|
||||
Future<List<dynamic>> getGroupMemberListMap({
|
||||
@ -548,6 +548,71 @@ class GroupManager {
|
||||
.then((value) =>
|
||||
Utils.toList(value, (map) => GroupMembersInfo.fromJson(map)));
|
||||
|
||||
/// 查询群
|
||||
/// [groupID] 群id
|
||||
/// [keywordList] 搜索关键词,目前仅支持一个关键词搜索,不能为空
|
||||
/// [isSearchUserID] 是否以关键词搜成员id
|
||||
/// [isSearchMemberNickname] 是否以关键词搜索成员昵称
|
||||
/// [offset] 开始index
|
||||
/// [count] 每次获取的总数
|
||||
Future<List<GroupMembersInfo>> searchGroupMembers({
|
||||
required String groupID,
|
||||
List<String> keywordList = const [],
|
||||
bool isSearchUserID = false,
|
||||
bool isSearchMemberNickname = false,
|
||||
int offset = 0,
|
||||
int count = 40,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'searchGroupMembers',
|
||||
_buildParam({
|
||||
'searchParam': {
|
||||
'groupID': groupID,
|
||||
'keywordList': keywordList,
|
||||
'isSearchUserID': isSearchUserID,
|
||||
'isSearchMemberNickname': isSearchMemberNickname,
|
||||
'offset': offset,
|
||||
'count': count,
|
||||
},
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) =>
|
||||
Utils.toList(value, (map) => GroupMembersInfo.fromJson(map)));
|
||||
|
||||
/// 查询群
|
||||
/// [groupID] 群id
|
||||
/// [keywordList] 搜索关键词,目前仅支持一个关键词搜索,不能为空
|
||||
/// [isSearchUserID] 是否以关键词搜成员id
|
||||
/// [isSearchMemberNickname] 是否以关键词搜索成员昵称
|
||||
/// [offset] 开始index
|
||||
/// [count] 每次获取的总数
|
||||
Future<List<dynamic>> searchGroupMembersListMap({
|
||||
required String groupID,
|
||||
List<String> keywordList = const [],
|
||||
bool isSearchUserID = false,
|
||||
bool isSearchMemberNickname = false,
|
||||
int offset = 0,
|
||||
int count = 40,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'searchGroupMembers',
|
||||
_buildParam({
|
||||
'searchParam': {
|
||||
'groupID': groupID,
|
||||
'keywordList': keywordList,
|
||||
'isSearchUserID': isSearchUserID,
|
||||
'isSearchMemberNickname': isSearchMemberNickname,
|
||||
'offset': offset,
|
||||
'count': count,
|
||||
},
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toListMap(value));
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "groupManager";
|
||||
return param;
|
||||
|
@ -138,7 +138,7 @@ class OrganizationManager {
|
||||
.invokeMethod(
|
||||
'searchOrganization',
|
||||
_buildParam({
|
||||
'searchParams': {
|
||||
'searchParam': {
|
||||
'keyWord': keyWord,
|
||||
'isSearchUserName': isSearchUserName,
|
||||
'isSearchEnglishName': isSearchEnglishName,
|
||||
|
@ -205,6 +205,16 @@ class GroupMembersInfo {
|
||||
data['inviterUserID'] = this.inviterUserID;
|
||||
return data;
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is GroupMembersInfo &&
|
||||
runtimeType == other.runtimeType &&
|
||||
userID == other.userID;
|
||||
|
||||
@override
|
||||
int get hashCode => userID.hashCode;
|
||||
}
|
||||
|
||||
/// 群成员角色
|
||||
|
Loading…
x
Reference in New Issue
Block a user