Upgrade
This commit is contained in:
@@ -243,6 +243,24 @@ class ConversationManager {
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// Reset group converstaion at type
|
||||
/// 重置at标准位
|
||||
Future<dynamic> resetConversationGroupAtType({
|
||||
required String conversationID,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'resetConversationGroupAtType',
|
||||
_buildParam({
|
||||
"conversationID": conversationID,
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// Get @ all member tag
|
||||
/// 查询at所有人标识
|
||||
Future<dynamic> getAtAllTag() =>
|
||||
_channel.invokeMethod('getAtAllTag', _buildParam({}));
|
||||
|
||||
/// Custom sort for conversation list
|
||||
/// 会话列表自定义排序规则。
|
||||
List<ConversationInfo> simpleSort(List<ConversationInfo> list) => list
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -258,6 +258,9 @@ class IMManager {
|
||||
case 'onInviteeRejectedByOtherDevice':
|
||||
signalingManager.listener.inviteeRejectedByOtherDevice(u);
|
||||
break;
|
||||
case 'onHangUp':
|
||||
signalingManager.listener.hangup(u);
|
||||
break;
|
||||
}
|
||||
} else if (call.method == ListenerType.workMomentsListener) {
|
||||
String type = call.arguments['type'];
|
||||
|
||||
@@ -529,8 +529,7 @@ class MessageManager {
|
||||
|
||||
/// Search local message
|
||||
/// 搜索消息
|
||||
/// [sourceID]单聊为用户ID,群聊为群ID
|
||||
/// [sessionType]会话类型,单聊为1,群聊为2,如果为0,则代表搜索全部
|
||||
/// [conversationID] 根据会话查询,如果是全局搜索传null
|
||||
/// [keywordList]搜索关键词列表,目前仅支持一个关键词搜索
|
||||
/// [keywordListMatchType]关键词匹配模式,1代表与,2代表或,暂时未用
|
||||
/// [senderUserIDList]指定消息发送的uid列表 暂时未用
|
||||
@@ -540,8 +539,7 @@ class MessageManager {
|
||||
/// [pageIndex]当前页数
|
||||
/// [count]每页数量
|
||||
Future<SearchResult> searchLocalMessages({
|
||||
required String sourceID,
|
||||
required int sessionType,
|
||||
String? conversationID,
|
||||
List<String> keywordList = const [],
|
||||
int keywordListMatchType = 0,
|
||||
List<String> senderUserIDList = const [],
|
||||
@@ -557,8 +555,7 @@ class MessageManager {
|
||||
'searchLocalMessages',
|
||||
_buildParam({
|
||||
'filter': {
|
||||
'sourceID': sourceID,
|
||||
'sessionType': sessionType,
|
||||
'conversationID': conversationID,
|
||||
'keywordList': keywordList,
|
||||
'keywordListMatchType': keywordListMatchType,
|
||||
'senderUserIDList': senderUserIDList,
|
||||
@@ -649,6 +646,32 @@ class MessageManager {
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// Find all history message
|
||||
/// 获取聊天记录
|
||||
/// [userID]接收消息的用户id
|
||||
/// [conversationID] 会话id
|
||||
/// [groupID]接收消息的组id
|
||||
Future<List<Message>> getHistoryMessageListReverse({
|
||||
String? userID,
|
||||
String? groupID,
|
||||
String? conversationID,
|
||||
Message? startMsg,
|
||||
int? count,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'getHistoryMessageListReverse',
|
||||
_buildParam({
|
||||
'userID': userID ?? '',
|
||||
'groupID': groupID ?? '',
|
||||
'conversationID': conversationID ?? '',
|
||||
'startClientMsgID': startMsg?.clientMsgID ?? '',
|
||||
'count': count ?? 10,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => Message.fromJson(map)));
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "messageManager";
|
||||
return param;
|
||||
|
||||
Reference in New Issue
Block a user