[Super Group]2.3.0
This commit is contained in:
parent
72111053bd
commit
a6aea5496a
@ -1,3 +1,12 @@
|
||||
## 2.3.0+1
|
||||
|
||||
- Fix bug
|
||||
- enum class MessageType new add customMsgNotTriggerConversation
|
||||
- enum class MessageType new add customMsgOnlineOnly
|
||||
- class IMManager new add updateFcmToken method
|
||||
- class MessageManager new add findMessageList method
|
||||
- initSDK method add encryptionKey param
|
||||
|
||||
## 2.3.0
|
||||
|
||||
- Fix bug
|
||||
|
@ -53,4 +53,12 @@ public class IMManager extends BaseManager {
|
||||
value(methodCall, "obj")
|
||||
);
|
||||
}
|
||||
|
||||
public void updateFcmToken(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.updateFcmToken(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "fcmToken")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -406,4 +406,11 @@ public class MessageManager extends BaseManager {
|
||||
);
|
||||
}
|
||||
|
||||
public void findMessageList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.findMessageList(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "options")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,8 @@ public class IMMananger: BaseServiceManager {
|
||||
self["logout"] = logout
|
||||
self["getLoginStatus"] = getLoginStatus
|
||||
self["wakeUp"] = wakeUp
|
||||
self["uploadImage"] = uploadImage
|
||||
self["updateFcmToken"] = updateFcmToken
|
||||
}
|
||||
|
||||
func initSDK(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
@ -35,6 +37,10 @@ public class IMMananger: BaseServiceManager {
|
||||
func uploadImage(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkUploadImage(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "path"], methodCall[string: "token"], methodCall[string: "obj"])
|
||||
}
|
||||
|
||||
func updateFcmToken(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkUpdateFcmToken(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "fcmToken"])
|
||||
}
|
||||
}
|
||||
|
||||
public class ConnListener: NSObject, Open_im_sdk_callbackOnConnListenerProtocol {
|
||||
|
@ -46,6 +46,7 @@ public class MessageManager: BaseServiceManager {
|
||||
self["getHistoryMessageListReverse"] = getHistoryMessageListReverse
|
||||
self["newRevokeMessage"] = newRevokeMessage
|
||||
self["getAdvancedHistoryMessageList"] = getAdvancedHistoryMessageList
|
||||
self["findMessageList"] = findMessageList
|
||||
}
|
||||
|
||||
func setAdvancedMsgListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
@ -223,6 +224,10 @@ public class MessageManager: BaseServiceManager {
|
||||
func getAdvancedHistoryMessageList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetAdvancedHistoryMessageList(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||
}
|
||||
|
||||
func findMessageList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkFindMessageList(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "options"])
|
||||
}
|
||||
}
|
||||
|
||||
public class SendMsgProgressListener: NSObject, Open_im_sdk_callbackSendMsgCallBackProtocol {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/// 群成员信息
|
||||
@ -211,10 +221,11 @@ class GroupMembersInfo {
|
||||
identical(this, other) ||
|
||||
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;
|
||||
}
|
||||
|
||||
/// 群成员角色
|
||||
|
Loading…
x
Reference in New Issue
Block a user