[Super Group]2.3.0
This commit is contained in:
@@ -48,6 +48,10 @@ class MessageType {
|
||||
/// 高级撤回
|
||||
static const advancedRevoke = 118;
|
||||
|
||||
static const customMsgNotTriggerConversation = 119;
|
||||
|
||||
static const customMsgOnlineOnly = 120;
|
||||
|
||||
/// 通知类型
|
||||
static const notificationBegin = 1000;
|
||||
|
||||
|
||||
@@ -309,6 +309,7 @@ class IMManager {
|
||||
required OnConnectListener listener,
|
||||
int logLevel = 6,
|
||||
String objectStorage = 'cos',
|
||||
String? encryptionKey,
|
||||
String? operationID,
|
||||
}) {
|
||||
this._connectListener = listener;
|
||||
@@ -323,6 +324,7 @@ class IMManager {
|
||||
"data_dir": dataDir,
|
||||
"log_level": logLevel,
|
||||
"object_storage": objectStorage,
|
||||
"encryption_key": encryptionKey,
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
},
|
||||
));
|
||||
@@ -404,6 +406,19 @@ class IMManager {
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// 更新firebase客户端注册token
|
||||
/// [fcmToken] firebase token
|
||||
Future updateFcmToken({
|
||||
required String fcmToken,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'updateFcmToken',
|
||||
_buildParam({
|
||||
'fcmToken': fcmToken,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "imManager";
|
||||
return param;
|
||||
|
||||
@@ -731,6 +731,27 @@ class MessageManager {
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => AdvancedMessage.fromJson(map)));
|
||||
|
||||
/// 查找消息详细
|
||||
/// [conversationID] 会话id
|
||||
/// [clientMsgIDList] 消息id列表
|
||||
Future<SearchResult> findMessageList({
|
||||
required String conversationID,
|
||||
required List<String> clientMsgIDList,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'findMessageList',
|
||||
_buildParam({
|
||||
'options': {
|
||||
"conversationID": conversationID,
|
||||
"clientMsgIDList": clientMsgIDList,
|
||||
},
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => SearchResult.fromJson(value)));
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "messageManager";
|
||||
return param;
|
||||
|
||||
@@ -119,6 +119,16 @@ class GroupInfo {
|
||||
int get sessionType => groupType == GroupType.general
|
||||
? ConversationType.group
|
||||
: ConversationType.superGroup;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is GroupInfo &&
|
||||
runtimeType == other.runtimeType &&
|
||||
groupID == other.groupID;
|
||||
|
||||
@override
|
||||
int get hashCode => groupID.hashCode;
|
||||
}
|
||||
|
||||
/// 群成员信息
|
||||
@@ -209,12 +219,13 @@ class GroupMembersInfo {
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is GroupMembersInfo &&
|
||||
other is GroupMembersInfo &&
|
||||
runtimeType == other.runtimeType &&
|
||||
groupID == other.groupID &&
|
||||
userID == other.userID;
|
||||
|
||||
@override
|
||||
int get hashCode => userID.hashCode;
|
||||
int get hashCode => groupID.hashCode ^ userID.hashCode;
|
||||
}
|
||||
|
||||
/// 群成员角色
|
||||
|
||||
Reference in New Issue
Block a user