This commit is contained in:
hrxiang
2022-04-28 16:28:13 +08:00
parent 6edf9b74fa
commit d5e3947878
20 changed files with 169 additions and 11 deletions

View File

@@ -382,6 +382,31 @@ class GroupManager {
'operationID': Utils.checkOperationID(operationID),
}));
/// Search group
/// 查询群
/// [keywordList] 搜索关键词,目前仅支持一个关键词搜索,不能为空
/// [isSearchGroupID] 是否以关键词搜索群ID(注两个不可以同时为false)为空默认false
/// [isSearchGroupName] 是否以关键词搜索群名字为空默认false
Future<List<GroupInfo>> searchGroups({
List<String> keywordList = const [],
bool isSearchGroupID = false,
bool isSearchGroupName = false,
String? operationID,
}) =>
_channel
.invokeMethod(
'searchGroups',
_buildParam({
'searchParam': {
'keywordList': keywordList,
'isSearchGroupID': isSearchGroupID,
'isSearchGroupName': isSearchGroupName,
},
'operationID': Utils.checkOperationID(operationID),
}))
.then(
(value) => Utils.toList(value, (map) => GroupInfo.fromJson(map)));
static Map _buildParam(Map param) {
param["ManagerName"] = "groupManager";
return param;