Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c5e640abf | ||
|
|
87360c5f69 | ||
|
|
a4e7ae13ee | ||
|
|
2da3a5e557 | ||
|
|
cfc94c06da | ||
|
|
3527c80e7b | ||
|
|
cdb994d5e3 | ||
|
|
e12799da0b | ||
|
|
0c7124a2a5 | ||
|
|
b1fa710117 | ||
|
|
b06dbe122e | ||
|
|
021a262325 | ||
|
|
9994a3939d | ||
|
|
c1f62d0661 |
@@ -1,7 +1,3 @@
|
||||
## 3.3.0
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/OpenIMSDK/openim-sdk-core/releases/tag/v3.3.0)
|
||||
|
||||
## 3.0.0
|
||||
|
||||
- The super update is not compatible with the previous version
|
||||
|
||||
@@ -52,5 +52,5 @@ android {
|
||||
dependencies {
|
||||
// 本地依赖,现将aar复制到libs/io/openim/core-sdk/0.0.1/ 下,命名core-sdk-0.0.1.aar
|
||||
// implementation 'io.openim:core-sdk:0.0.1@aar'
|
||||
implementation 'io.openim:core-sdk:3.3.0@aar'
|
||||
implementation 'io.openim:core-sdk:3.1.0-e@aar'
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import io.openim.flutter_openim_sdk.manager.FriendshipManager;
|
||||
import io.openim.flutter_openim_sdk.manager.GroupManager;
|
||||
import io.openim.flutter_openim_sdk.manager.IMManager;
|
||||
import io.openim.flutter_openim_sdk.manager.MessageManager;
|
||||
import io.openim.flutter_openim_sdk.manager.SignalingManager;
|
||||
import io.openim.flutter_openim_sdk.manager.UserManager;
|
||||
|
||||
|
||||
@@ -42,6 +43,7 @@ public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler,
|
||||
private static MessageManager messageManager;
|
||||
private static ConversationManager conversationManager;
|
||||
private static GroupManager groupManager;
|
||||
private static SignalingManager signalingManager;
|
||||
private static Activity activity;
|
||||
private static Context context;
|
||||
private ConnectivityListener connectivityListener;
|
||||
@@ -55,6 +57,7 @@ public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler,
|
||||
FlutterOpenimSdkPlugin.messageManager = new MessageManager();
|
||||
FlutterOpenimSdkPlugin.conversationManager = new ConversationManager();
|
||||
FlutterOpenimSdkPlugin.groupManager = new GroupManager();
|
||||
FlutterOpenimSdkPlugin.signalingManager = new SignalingManager();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -19,13 +19,15 @@ public class OnBaseListener implements Base {
|
||||
|
||||
@Override
|
||||
public void onError(int l, String s) {
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "method: 【 " + call.method + " 】, onError: { code:" + l + ", message:" + s + "}");
|
||||
String threadName = Thread.currentThread().getName();
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "thread: " + threadName + " method: 【 " + call.method + " 】, onError: { code:" + l + ", message:" + s + "}");
|
||||
CommonUtil.runMainThreadReturnError(result, l, s, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "method: 【 " + call.method + " 】, onSuccess: " + s);
|
||||
String threadName = Thread.currentThread().getName();
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "thread: " + threadName + " method: 【 " + call.method + " 】, onSuccess: " + s);
|
||||
CommonUtil.runMainThreadReturn(result, s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
|
||||
public class OnSignalingListener implements open_im_sdk_callback.OnSignalingListener {
|
||||
|
||||
@Override
|
||||
public void onInvitationCancelled(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onInvitationCancelled", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInvitationTimeout(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onInvitationTimeout", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInviteeAccepted(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onInviteeAccepted", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInviteeAcceptedByOtherDevice(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onInviteeAcceptedByOtherDevice", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInviteeRejected(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onInviteeRejected", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInviteeRejectedByOtherDevice(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onInviteeRejectedByOtherDevice", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceiveCustomSignal(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onReceiveCustomSignal", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceiveNewInvitation(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onReceiveNewInvitation", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRoomParticipantConnected(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onRoomParticipantConnected", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRoomParticipantDisconnected(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onRoomParticipantDisconnected", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStreamChange(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onStreamChange", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHangUp(String s) {
|
||||
CommonUtil.emitEvent("signalingListener", "onHangUp", s);
|
||||
}
|
||||
}
|
||||
@@ -8,9 +8,4 @@ public class OnUserListener implements open_im_sdk_callback.OnUserListener {
|
||||
public void onSelfInfoUpdated(String s) {
|
||||
CommonUtil.emitEvent("userListener", "onSelfInfoUpdated", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserStatusChanged(String s) {
|
||||
CommonUtil.emitEvent("userListener", "onUserStatusChanged", s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,10 +20,6 @@ public class IMManager extends BaseManager {
|
||||
CommonUtil.runMainThreadReturn(result, initialized);
|
||||
}
|
||||
|
||||
public void unInitSDK(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.unInitSDK(value(methodCall, "operationID"));
|
||||
}
|
||||
|
||||
public void login(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.login(
|
||||
new OnBaseListener(result, methodCall),
|
||||
|
||||
@@ -382,15 +382,7 @@ public class MessageManager extends BaseManager {
|
||||
);
|
||||
}
|
||||
|
||||
public void setMessageLocalEx(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setMessageLocalEx(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "conversationID"),
|
||||
value(methodCall, "clientMsgID"),
|
||||
value(methodCall, "localEx")
|
||||
);
|
||||
}
|
||||
|
||||
public void sendMessageNotOss(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.sendMessageNotOss(
|
||||
new OnMsgSendListener(result, methodCall),
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
package io.openim.flutter_openim_sdk.manager;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnSignalingListener;
|
||||
import open_im_sdk.Open_im_sdk;
|
||||
|
||||
public class SignalingManager extends BaseManager {
|
||||
|
||||
public void setSignalingListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setSignalingListener(new OnSignalingListener());
|
||||
|
||||
result.success(null);
|
||||
}
|
||||
|
||||
public void signalingInvite(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingInvite(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "signalingInfo"));
|
||||
}
|
||||
|
||||
public void signalingInviteInGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingInviteInGroup(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "signalingInfo"));
|
||||
}
|
||||
|
||||
public void signalingAccept(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingAccept(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "signalingInfo"));
|
||||
}
|
||||
|
||||
public void signalingReject(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingReject(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "signalingInfo"));
|
||||
}
|
||||
|
||||
public void signalingCancel(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingCancel(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "signalingInfo"));
|
||||
}
|
||||
|
||||
public void signalingHungUp(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingHungUp(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "signalingInfo"));
|
||||
}
|
||||
|
||||
public void signalingGetRoomByGroupID(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingGetRoomByGroupID(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "groupID"));
|
||||
}
|
||||
|
||||
public void signalingGetTokenByRoomID(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingGetTokenByRoomID(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "roomID"));
|
||||
}
|
||||
|
||||
public void signalingUpdateMeetingInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingUpdateMeetingInfo(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "info"));
|
||||
}
|
||||
|
||||
public void signalingCreateMeeting(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingCreateMeeting(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "info"));
|
||||
}
|
||||
|
||||
public void signalingJoinMeeting(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingJoinMeeting(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "info"));
|
||||
}
|
||||
|
||||
public void signalingOperateStream(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingOperateStream(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "streamType"),
|
||||
value(methodCall, "roomID"),
|
||||
value(methodCall, "userID"),
|
||||
value(methodCall, "mute"),
|
||||
value(methodCall, "muteAll"));
|
||||
}
|
||||
|
||||
public void signalingGetMeetings(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingGetMeetings(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"));
|
||||
}
|
||||
|
||||
public void signalingCloseRoom(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingCloseRoom(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "roomID"));
|
||||
}
|
||||
|
||||
public void signalingSendCustomSignal(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.signalingSendCustomSignal(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "customInfo"),
|
||||
value(methodCall, "roomID"));
|
||||
}
|
||||
|
||||
public void getSignalingInvitationInfoStartApp(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getSignalingInvitationInfoStartApp(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"));
|
||||
}
|
||||
}
|
||||
@@ -34,39 +34,4 @@ public class UserManager extends BaseManager {
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
public void subscribeUsersStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.subscribeUsersStatus(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "userIDs"));
|
||||
}
|
||||
|
||||
public void unsubscribeUsersStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.unsubscribeUsersStatus(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "userIDs"));
|
||||
}
|
||||
|
||||
public void getSubscribeUsersStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getSubscribeUsersStatus(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getUserStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getUserStatus(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "userIDs"));
|
||||
}
|
||||
|
||||
public void getUsersInfoStranger(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getUsersInfoStranger(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "userIDs"),
|
||||
value(methodCall, "groupID"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ public class CommonUtil {
|
||||
}
|
||||
|
||||
public synchronized static <T> void emitEvent(String method, String type, Object errCode, String errMsg, T data) {
|
||||
String threadName = Thread.currentThread().getName();
|
||||
runMainThread(() -> {
|
||||
Map<String, Object> res = new ArrayMap<>();
|
||||
if (null != type) {
|
||||
@@ -47,7 +48,7 @@ public class CommonUtil {
|
||||
if (null != errMsg) {
|
||||
res.put("errMsg", errMsg);
|
||||
}
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "{ method:" + method + ", type:" + type + " }");
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "thread: " + threadName + " { method:" + method + ", type:" + type + " }");
|
||||
FlutterOpenimSdkPlugin.channel.invokeMethod(method, res);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ PODS:
|
||||
- Flutter (1.0.0)
|
||||
- flutter_openim_sdk (0.0.1):
|
||||
- Flutter
|
||||
- OpenIMSDKCore (= 3.0.0)
|
||||
- "OpenIMSDKCore (3.0.0+1)"
|
||||
- OpenIMSDKCore (= 3.0.0-e)
|
||||
- OpenIMSDKCore (3.0.0-e)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
@@ -21,8 +21,8 @@ EXTERNAL SOURCES:
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
flutter_openim_sdk: 12daf3769f8bf40001970304445b6155c146b7eb
|
||||
OpenIMSDKCore: 2e38a5b9be23e588b5049ebd378161cf277e41a0
|
||||
flutter_openim_sdk: 9b4a8c3f8bc581249d074c4090b32d743adee0e0
|
||||
OpenIMSDKCore: b6b5620eb31da76b9c0142e703dff2924341871a
|
||||
|
||||
PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ConversationManager: BaseServiceManager {
|
||||
}
|
||||
|
||||
func setConversationRecvMessageOpt(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSetConversationRecvMessageOpt(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[int: "status"])
|
||||
Open_im_sdkSetConversationRecvMessageOpt(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "conversationID"], methodCall[int: "status"])
|
||||
}
|
||||
|
||||
func getConversationRecvMessageOpt(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
|
||||
@@ -8,7 +8,6 @@ public class IMMananger: BaseServiceManager {
|
||||
public override func registerHandlers() {
|
||||
super.registerHandlers()
|
||||
self["initSDK"] = initSDK
|
||||
self["unInitSDK"] = unInitSDK
|
||||
self["login"] = login
|
||||
self["logout"] = logout
|
||||
self["getLoginStatus"] = getLoginStatus
|
||||
@@ -60,14 +59,10 @@ public class IMMananger: BaseServiceManager {
|
||||
}
|
||||
|
||||
func initSDK(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
callBack(result, Open_im_sdkInitSDK(ConnListener(channel: self.channel), methodCall[string: "operationID"], methodCall.toJsonString()))
|
||||
callBack(result,Open_im_sdkInitSDK(ConnListener(channel: self.channel), methodCall[string: "operationID"], methodCall.toJsonString()))
|
||||
addObservers()
|
||||
}
|
||||
|
||||
func unInitSDK(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkUnInitSDK(methodCall[string: "operationID"])
|
||||
}
|
||||
|
||||
func login(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkLogin(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "userID"], methodCall[string: "token"])
|
||||
}
|
||||
|
||||
@@ -45,7 +45,6 @@ public class MessageManager: BaseServiceManager {
|
||||
self["getAdvancedHistoryMessageListReverse"] = getAdvancedHistoryMessageListReverse
|
||||
|
||||
self["findMessageList"] = findMessageList
|
||||
self["setMessageLocalEx"] = setMessageLocalEx
|
||||
|
||||
self["sendMessageNotOss"] = sendMessageNotOss
|
||||
self["createImageMessageByURL"] = createImageMessageByURL
|
||||
@@ -219,10 +218,6 @@ public class MessageManager: BaseServiceManager {
|
||||
Open_im_sdkFindMessageList(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParams"])
|
||||
}
|
||||
|
||||
func setMessageLocalEx(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSetMessageLocalEx(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[string: "clientMsgID"], methodCall[string: "localEx"])
|
||||
}
|
||||
|
||||
func sendMessageNotOss(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let sendMsgProgressListener: SendMsgProgressListener = SendMsgProgressListener(channel: channel,result: result,methodCall: methodCall)
|
||||
Open_im_sdkSendMessageNotOss(sendMsgProgressListener, methodCall[string: "operationID"], methodCall[jsonString: "message"], methodCall[string: "userID"],
|
||||
|
||||
59
ios/Classes/Module/OrganizationManager.swift
Normal file
59
ios/Classes/Module/OrganizationManager.swift
Normal file
@@ -0,0 +1,59 @@
|
||||
//import Foundation
|
||||
//import OpenIMCore
|
||||
//
|
||||
//public class OrganizationManager: BaseServiceManager {
|
||||
//
|
||||
// public override func registerHandlers() {
|
||||
// super.registerHandlers()
|
||||
// self["setOrganizationListener"] = setOrganizationListener
|
||||
// self["getSubDepartment"] = getSubDepartment
|
||||
// self["getDepartmentMember"] = getDepartmentMember
|
||||
// self["getUserInDepartment"] = getUserInDepartment
|
||||
// self["getDepartmentMemberAndSubDepartment"] = getDepartmentMemberAndSubDepartment
|
||||
// self["getDepartmentInfo"] = getDepartmentInfo
|
||||
// self["searchOrganization"] = searchOrganization
|
||||
// }
|
||||
//
|
||||
// func setOrganizationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSetOrganizationListener(OrganizationListener(channel: channel))
|
||||
// callBack(result)
|
||||
// }
|
||||
//
|
||||
// func getSubDepartment(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
// Open_im_sdkGetSubDepartment(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||
// }
|
||||
//
|
||||
// func getDepartmentMember(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
// Open_im_sdkGetDepartmentMember(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||
// }
|
||||
//
|
||||
// func getUserInDepartment(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
// Open_im_sdkGetUserInDepartment(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "userID"])
|
||||
// }
|
||||
//
|
||||
// func getDepartmentMemberAndSubDepartment(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
// Open_im_sdkGetDepartmentMemberAndSubDepartment(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"])
|
||||
// }
|
||||
//
|
||||
// func getDepartmentInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
// Open_im_sdkGetDepartmentInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"])
|
||||
// }
|
||||
//
|
||||
// func searchOrganization(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
// Open_im_sdkSearchOrganization(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//public class OrganizationListener: NSObject, Open_im_sdk_callbackOnOrganizationListenerProtocol {
|
||||
//
|
||||
// private let channel:FlutterMethodChannel
|
||||
//
|
||||
// init(channel:FlutterMethodChannel) {
|
||||
// self.channel = channel
|
||||
// }
|
||||
//
|
||||
// public func onOrganizationUpdated() {
|
||||
// CommonUtil.emitEvent(channel: self.channel, method: "organizationListener", type: "onOrganizationUpdated", errCode: nil, errMsg: nil, data: nil)
|
||||
// }
|
||||
//
|
||||
//}
|
||||
149
ios/Classes/Module/SignalingManager.swift
Normal file
149
ios/Classes/Module/SignalingManager.swift
Normal file
@@ -0,0 +1,149 @@
|
||||
import Foundation
|
||||
import OpenIMCore
|
||||
|
||||
public class SignalingManager: BaseServiceManager {
|
||||
|
||||
public override func registerHandlers() {
|
||||
super.registerHandlers()
|
||||
self["setSignalingListener"] = setSignalingListener
|
||||
self["signalingInvite"] = signalingInvite
|
||||
self["signalingInviteInGroup"] = signalingInviteInGroup
|
||||
self["signalingAccept"] = signalingAccept
|
||||
self["signalingReject"] = signalingReject
|
||||
self["signalingCancel"] = signalingCancel
|
||||
self["signalingHungUp"] = signalingHungUp
|
||||
self["signalingGetRoomByGroupID"] = signalingGetRoomByGroupID
|
||||
self["signalingGetTokenByRoomID"] = signalingGetTokenByRoomID
|
||||
self["signalingUpdateMeetingInfo"] = signalingUpdateMeetingInfo
|
||||
self["signalingCreateMeeting"] = signalingCreateMeeting
|
||||
self["signalingJoinMeeting"] = signalingJoinMeeting
|
||||
self["signalingOperateStream"] = signalingOperateStream
|
||||
self["signalingGetMeetings"] = signalingGetMeetings
|
||||
self["signalingCloseRoom"] = signalingCloseRoom
|
||||
self["signalingSendCustomSignal"] = signalingSendCustomSignal
|
||||
}
|
||||
|
||||
func setSignalingListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSetSignalingListener(SignalingListener(channel: channel))
|
||||
callBack(result)
|
||||
}
|
||||
|
||||
func signalingInvite(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingInvite(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
}
|
||||
|
||||
func signalingInviteInGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingInviteInGroup(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
}
|
||||
|
||||
func signalingAccept(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingAccept(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
}
|
||||
|
||||
func signalingReject(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingReject(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
}
|
||||
|
||||
func signalingCancel(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingCancel(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
}
|
||||
|
||||
func signalingHungUp(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingHungUp(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "signalingInfo"])
|
||||
}
|
||||
|
||||
func signalingGetRoomByGroupID(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingGetRoomByGroupID(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"])
|
||||
}
|
||||
|
||||
func signalingGetTokenByRoomID(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingGetTokenByRoomID(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "roomID"])
|
||||
}
|
||||
|
||||
func signalingUpdateMeetingInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingUpdateMeetingInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "info"])
|
||||
}
|
||||
|
||||
func signalingCreateMeeting(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingCreateMeeting(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "info"])
|
||||
}
|
||||
|
||||
func signalingJoinMeeting(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingJoinMeeting(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "info"])
|
||||
}
|
||||
|
||||
func signalingOperateStream(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingOperateStream(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "streamType"], methodCall[string: "roomID"], methodCall[string: "userID"], methodCall[bool: "mute"], methodCall[bool: "muteAll"])
|
||||
}
|
||||
|
||||
func signalingGetMeetings(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingGetMeetings(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||
}
|
||||
|
||||
func signalingCloseRoom(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingCloseRoom(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "roomID"])
|
||||
}
|
||||
|
||||
func signalingSendCustomSignal(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSignalingSendCustomSignal(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "customInfo"], methodCall[string: "roomID"])
|
||||
}
|
||||
}
|
||||
|
||||
public class SignalingListener: NSObject, Open_im_sdk_callbackOnSignalingListenerProtocol {
|
||||
|
||||
|
||||
private let channel:FlutterMethodChannel
|
||||
|
||||
init(channel:FlutterMethodChannel) {
|
||||
self.channel = channel
|
||||
}
|
||||
|
||||
public func onInvitationCancelled(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInvitationCancelled", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onInvitationTimeout(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInvitationTimeout", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onInviteeAccepted(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeAccepted", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onInviteeAccepted(byOtherDevice s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeAcceptedByOtherDevice", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onInviteeRejected(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeRejected", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onInviteeRejected(byOtherDevice s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onInviteeRejectedByOtherDevice", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onReceiveNewInvitation(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onReceiveNewInvitation", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onHangUp(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onHangUp", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onRoomParticipantConnected(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onRoomParticipantConnected", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onRoomParticipantDisconnected(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onRoomParticipantDisconnected", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onStreamChange(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onStreamChange", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
public func onReceiveCustomSignal(_ s: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "signalingListener", type: "onReceiveCustomSignal", errCode: nil, errMsg: nil, data: s)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,11 +9,6 @@ public class UserManager: BaseServiceManager {
|
||||
self["getUsersInfo"] = getUsersInfo
|
||||
self["setSelfInfo"] = setSelfInfo
|
||||
self["getSelfUserInfo"] = getSelfUserInfo
|
||||
self["subscribeUsersStatus"] = subscribeUsersStatus
|
||||
self["unsubscribeUsersStatus"] = unsubscribeUsersStatus
|
||||
self["getSubscribeUsersStatus"] = getSubscribeUsersStatus
|
||||
self["getUserStatus"] = getUserStatus
|
||||
self["getUsersInfoStranger"] = getUsersInfoStranger
|
||||
}
|
||||
|
||||
func setUserListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
@@ -32,26 +27,6 @@ public class UserManager: BaseServiceManager {
|
||||
func getSelfUserInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkGetSelfUserInfo(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||
}
|
||||
|
||||
func subscribeUsersStatus(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSubscribeUsersStatus(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "userIDs"])
|
||||
}
|
||||
|
||||
func unsubscribeUsersStatus(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkUnsubscribeUsersStatus(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "userIDs"])
|
||||
}
|
||||
|
||||
func getSubscribeUsersStatus(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetSubscribeUsersStatus(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||
}
|
||||
|
||||
func getUserStatus(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetUserStatus(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "userIDs"])
|
||||
}
|
||||
|
||||
func getUsersInfoStranger(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetUsersInfoStranger(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "userIDs"], methodCall[string: "groupID"])
|
||||
}
|
||||
}
|
||||
|
||||
public class UserListener: NSObject, Open_im_sdk_callbackOnUserListenerProtocol {
|
||||
@@ -65,9 +40,4 @@ public class UserListener: NSObject, Open_im_sdk_callbackOnUserListenerProtocol
|
||||
public func onSelfInfoUpdated(_ userInfo: String?) {
|
||||
CommonUtil.emitEvent(channel: self.channel, method: "userListener", type: "onSelfInfoUpdated", errCode: nil, errMsg: nil, data: userInfo)
|
||||
}
|
||||
|
||||
public func onUserStatusChanged(_ statusInfo: String?) {
|
||||
CommonUtil.emitEvent(channel: self.channel, method: "userListener", type: "onUserStatusChanged", errCode: nil, errMsg: nil, data: statusInfo)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
44
ios/Classes/Module/WorkMomentsManager.swift
Normal file
44
ios/Classes/Module/WorkMomentsManager.swift
Normal file
@@ -0,0 +1,44 @@
|
||||
//import Foundation
|
||||
//import OpenIMCore
|
||||
//
|
||||
//public class WorkMomentsManager: BaseServiceManager {
|
||||
//
|
||||
// public override func registerHandlers() {
|
||||
// super.registerHandlers()
|
||||
// self["setWorkMomentsListener"] = setWorkMomentsListener
|
||||
// self["getWorkMomentsUnReadCount"] = getWorkMomentsUnReadCount
|
||||
// self["getWorkMomentsNotification"] = getWorkMomentsNotification
|
||||
// self["clearWorkMomentsNotification"] = clearWorkMomentsNotification
|
||||
// }
|
||||
//
|
||||
// func setWorkMomentsListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkSetWorkMomentsListener(WorkMomentsListener(channel: channel))
|
||||
// callBack(result)
|
||||
// }
|
||||
//
|
||||
// func getWorkMomentsUnReadCount(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
// Open_im_sdkGetWorkMomentsUnReadCount(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||
// }
|
||||
//
|
||||
// func getWorkMomentsNotification(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
// Open_im_sdkGetWorkMomentsNotification(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||
// }
|
||||
//
|
||||
// func clearWorkMomentsNotification(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
// Open_im_sdkClearWorkMomentsNotification(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//public class WorkMomentsListener: NSObject, Open_im_sdk_callbackOnWorkMomentsListenerProtocol {
|
||||
//
|
||||
// private let channel:FlutterMethodChannel
|
||||
//
|
||||
// init(channel:FlutterMethodChannel) {
|
||||
// self.channel = channel
|
||||
// }
|
||||
//
|
||||
// public func onRecvNewNotification() {
|
||||
// CommonUtil.emitEvent(channel: self.channel, method: "workMomentsListener", type: "OnRecvNewNotification", errCode: nil, errMsg: nil, data: nil)
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@@ -8,7 +8,7 @@ public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin {
|
||||
let messageManager: MessageManager
|
||||
let groupManager: GroupManager
|
||||
let userManger: UserManager
|
||||
// let signalingManager: SignalingManager
|
||||
let signalingManager: SignalingManager
|
||||
// let workMomentsManager: WorkMomentsManager
|
||||
// let organizationManager: OrganizationManager
|
||||
|
||||
@@ -19,7 +19,7 @@ public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin {
|
||||
self.messageManager = MessageManager(channel: channel)
|
||||
self.groupManager = GroupManager(channel: channel)
|
||||
self.userManger = UserManager(channel: channel)
|
||||
// self.signalingManager = SignalingManager(channel: channel)
|
||||
self.signalingManager = SignalingManager(channel: channel)
|
||||
// self.workMomentsManager = WorkMomentsManager(channel: channel)
|
||||
// self.organizationManager = OrganizationManager(channel: channel)
|
||||
}
|
||||
@@ -45,8 +45,8 @@ public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin {
|
||||
groupManager.handleMethod(call: call, result: result)
|
||||
case "userManager":
|
||||
userManger.handleMethod(call: call, result: result)
|
||||
// case "signalingManager":
|
||||
// signalingManager.handleMethod(call: call, result: result)
|
||||
case "signalingManager":
|
||||
signalingManager.handleMethod(call: call, result: result)
|
||||
// case "workMomentsManager":
|
||||
// workMomentsManager.handleMethod(call: call, result: result)
|
||||
// case "organizationManager":
|
||||
|
||||
@@ -17,7 +17,7 @@ A new Flutter project.
|
||||
s.dependency 'Flutter'
|
||||
s.platform = :ios, '11.0'
|
||||
|
||||
s.dependency 'OpenIMSDKCore','3.3.0'
|
||||
s.dependency 'OpenIMSDKCore','3.1.0-e'
|
||||
s.static_framework = true
|
||||
# s.vendored_frameworks = 'Framework/*.framework'
|
||||
# Flutter.framework does not contain a i386 slice.
|
||||
|
||||
@@ -21,19 +21,23 @@ export 'src/listener/listener_for_service.dart';
|
||||
export 'src/listener/message_kv_info_listener.dart';
|
||||
export 'src/listener/msg_send_progress_listener.dart';
|
||||
export 'src/listener/upload_file_listener.dart';
|
||||
export 'src/listener/signaling_listener.dart';
|
||||
export 'src/listener/user_listener.dart';
|
||||
export 'src/manager/im_conversation_manager.dart';
|
||||
export 'src/manager/im_friendship_manager.dart';
|
||||
export 'src/manager/im_group_manager.dart';
|
||||
export 'src/manager/im_manager.dart';
|
||||
export 'src/manager/im_message_manager.dart';
|
||||
export 'src/manager/im_signaling_manager.dart';
|
||||
export 'src/manager/im_user_manager.dart';
|
||||
export 'src/models/conversation_info.dart';
|
||||
export 'src/models/group_info.dart';
|
||||
export 'src/models/meeting_info.dart';
|
||||
export 'src/models/message.dart';
|
||||
export 'src/models/notification_info.dart';
|
||||
export 'src/models/organization_info.dart';
|
||||
export 'src/models/search_info.dart';
|
||||
export 'src/models/signaling_info.dart';
|
||||
export 'src/models/user_info.dart';
|
||||
export 'src/openim.dart';
|
||||
export 'src/utils.dart';
|
||||
|
||||
88
lib/src/listener/signaling_listener.dart
Normal file
88
lib/src/listener/signaling_listener.dart
Normal file
@@ -0,0 +1,88 @@
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
|
||||
/// 信令监听
|
||||
class OnSignalingListener {
|
||||
final Function(SignalingInfo info)? onInvitationCancelled;
|
||||
final Function(SignalingInfo info)? onInvitationTimeout;
|
||||
final Function(SignalingInfo info)? onInviteeAccepted;
|
||||
final Function(SignalingInfo info)? onInviteeRejected;
|
||||
final Function(SignalingInfo info)? onReceiveNewInvitation;
|
||||
final Function(SignalingInfo info)? onInviteeRejectedByOtherDevice;
|
||||
final Function(SignalingInfo info)? onInviteeAcceptedByOtherDevice;
|
||||
final Function(SignalingInfo info)? onHangup;
|
||||
final Function(RoomCallingInfo info)? onRoomParticipantConnected;
|
||||
final Function(RoomCallingInfo info)? onRoomParticipantDisconnected;
|
||||
final Function(MeetingStreamEvent event)? onMeetingStreamChanged;
|
||||
final Function(CustomSignaling info)? onReceiveCustomSignal;
|
||||
|
||||
OnSignalingListener({
|
||||
this.onInvitationCancelled,
|
||||
this.onInvitationTimeout,
|
||||
this.onInviteeAccepted,
|
||||
this.onInviteeRejected,
|
||||
this.onReceiveNewInvitation,
|
||||
this.onInviteeAcceptedByOtherDevice,
|
||||
this.onInviteeRejectedByOtherDevice,
|
||||
this.onHangup,
|
||||
this.onRoomParticipantConnected,
|
||||
this.onRoomParticipantDisconnected,
|
||||
this.onMeetingStreamChanged,
|
||||
this.onReceiveCustomSignal,
|
||||
});
|
||||
|
||||
/// 被邀请者收到:邀请者取消音视频通话
|
||||
void invitationCancelled(SignalingInfo info) {
|
||||
onInvitationCancelled?.call(info);
|
||||
}
|
||||
|
||||
/// 邀请者收到:被邀请者超时未接通
|
||||
void invitationTimeout(SignalingInfo info) {
|
||||
onInvitationTimeout?.call(info);
|
||||
}
|
||||
|
||||
/// 邀请者收到:被邀请者同意音视频通话
|
||||
void inviteeAccepted(SignalingInfo info) {
|
||||
onInviteeAccepted?.call(info);
|
||||
}
|
||||
|
||||
/// 邀请者收到:被邀请者拒绝音视频通话
|
||||
void inviteeRejected(SignalingInfo info) {
|
||||
onInviteeRejected?.call(info);
|
||||
}
|
||||
|
||||
/// 被邀请者收到:音视频通话邀请
|
||||
void receiveNewInvitation(SignalingInfo info) {
|
||||
onReceiveNewInvitation?.call(info);
|
||||
}
|
||||
|
||||
/// 被邀请者(其他端)收到:比如被邀请者在手机拒接,在pc上会收到此回调
|
||||
void inviteeAcceptedByOtherDevice(SignalingInfo info) {
|
||||
onInviteeAcceptedByOtherDevice?.call(info);
|
||||
}
|
||||
|
||||
/// 被邀请者(其他端)收到:比如被邀请者在手机拒接,在pc上会收到此回调
|
||||
void inviteeRejectedByOtherDevice(SignalingInfo info) {
|
||||
onInviteeRejectedByOtherDevice?.call(info);
|
||||
}
|
||||
|
||||
/// 被挂断
|
||||
void hangup(SignalingInfo info) {
|
||||
onHangup?.call(info);
|
||||
}
|
||||
|
||||
void roomParticipantConnected(RoomCallingInfo info) {
|
||||
onRoomParticipantConnected?.call(info);
|
||||
}
|
||||
|
||||
void roomParticipantDisconnected(RoomCallingInfo info) {
|
||||
onRoomParticipantDisconnected?.call(info);
|
||||
}
|
||||
|
||||
void streamChangedEvent(MeetingStreamEvent event) {
|
||||
onMeetingStreamChanged?.call(event);
|
||||
}
|
||||
|
||||
void receiveCustomSignal(CustomSignaling info) {
|
||||
onReceiveCustomSignal?.call(info);
|
||||
}
|
||||
}
|
||||
@@ -4,16 +4,11 @@ import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
class OnUserListener {
|
||||
/// The information of the logged-in user has been updated
|
||||
Function(UserInfo info)? onSelfInfoUpdated;
|
||||
Function(UserStatusInfo info)? onUserStatusChanged;
|
||||
|
||||
OnUserListener({this.onSelfInfoUpdated, this.onUserStatusChanged});
|
||||
OnUserListener({this.onSelfInfoUpdated});
|
||||
|
||||
/// 自身信息发送变化回调
|
||||
void selfInfoUpdated(UserInfo info) {
|
||||
onSelfInfoUpdated?.call(info);
|
||||
}
|
||||
|
||||
void userStatusChanged(UserStatusInfo info) {
|
||||
onUserStatusChanged?.call(info);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ class IMManager {
|
||||
late MessageManager messageManager;
|
||||
late GroupManager groupManager;
|
||||
late UserManager userManager;
|
||||
late SignalingManager signalingManager;
|
||||
|
||||
late OnConnectListener _connectListener;
|
||||
OnListenerForService? _listenerForService;
|
||||
@@ -20,6 +21,7 @@ class IMManager {
|
||||
late UserInfo userInfo;
|
||||
bool isLogined = false;
|
||||
String? token;
|
||||
String? _objectStorage;
|
||||
|
||||
IMManager(this._channel) {
|
||||
conversationManager = ConversationManager(_channel);
|
||||
@@ -27,6 +29,7 @@ class IMManager {
|
||||
messageManager = MessageManager(_channel);
|
||||
groupManager = GroupManager(_channel);
|
||||
userManager = UserManager(_channel);
|
||||
signalingManager = SignalingManager(_channel);
|
||||
_addNativeCallback(_channel);
|
||||
}
|
||||
|
||||
@@ -63,29 +66,29 @@ class IMManager {
|
||||
userInfo = Utils.toObj(data, (map) => UserInfo.fromJson(map));
|
||||
userManager.listener.selfInfoUpdated(userInfo);
|
||||
break;
|
||||
case 'onUserStatusChanged':
|
||||
final status = Utils.toObj(data, (map) => UserStatusInfo.fromJson(map));
|
||||
userManager.listener.userStatusChanged(status);
|
||||
break;
|
||||
}
|
||||
} else if (call.method == ListenerType.groupListener) {
|
||||
String type = call.arguments['type'];
|
||||
dynamic data = call.arguments['data'];
|
||||
switch (type) {
|
||||
case 'onGroupApplicationAccepted':
|
||||
final i = Utils.toObj(data, (map) => GroupApplicationInfo.fromJson(map));
|
||||
final i = Utils.toObj(
|
||||
data, (map) => GroupApplicationInfo.fromJson(map));
|
||||
groupManager.listener.groupApplicationAccepted(i);
|
||||
break;
|
||||
case 'onGroupApplicationAdded':
|
||||
final i = Utils.toObj(data, (map) => GroupApplicationInfo.fromJson(map));
|
||||
final i = Utils.toObj(
|
||||
data, (map) => GroupApplicationInfo.fromJson(map));
|
||||
groupManager.listener.groupApplicationAdded(i);
|
||||
break;
|
||||
case 'onGroupApplicationDeleted':
|
||||
final i = Utils.toObj(data, (map) => GroupApplicationInfo.fromJson(map));
|
||||
final i = Utils.toObj(
|
||||
data, (map) => GroupApplicationInfo.fromJson(map));
|
||||
groupManager.listener.groupApplicationDeleted(i);
|
||||
break;
|
||||
case 'onGroupApplicationRejected':
|
||||
final i = Utils.toObj(data, (map) => GroupApplicationInfo.fromJson(map));
|
||||
final i = Utils.toObj(
|
||||
data, (map) => GroupApplicationInfo.fromJson(map));
|
||||
groupManager.listener.groupApplicationRejected(i);
|
||||
break;
|
||||
case 'onGroupDismissed':
|
||||
@@ -97,15 +100,18 @@ class IMManager {
|
||||
groupManager.listener.groupInfoChanged(i);
|
||||
break;
|
||||
case 'onGroupMemberAdded':
|
||||
final i = Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
|
||||
final i =
|
||||
Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
|
||||
groupManager.listener.groupMemberAdded(i);
|
||||
break;
|
||||
case 'onGroupMemberDeleted':
|
||||
final i = Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
|
||||
final i =
|
||||
Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
|
||||
groupManager.listener.groupMemberDeleted(i);
|
||||
break;
|
||||
case 'onGroupMemberInfoChanged':
|
||||
final i = Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
|
||||
final i =
|
||||
Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
|
||||
groupManager.listener.groupMemberInfoChanged(i);
|
||||
break;
|
||||
case 'onJoinedGroupAdded':
|
||||
@@ -133,31 +139,36 @@ class IMManager {
|
||||
break;
|
||||
case 'onRecvC2CReadReceipt':
|
||||
var value = call.arguments['data']['msgReceiptList'];
|
||||
var list = Utils.toList(value, (map) => ReadReceiptInfo.fromJson(map));
|
||||
var list =
|
||||
Utils.toList(value, (map) => ReadReceiptInfo.fromJson(map));
|
||||
messageManager.msgListener.recvC2CReadReceipt(list);
|
||||
break;
|
||||
case 'onRecvGroupReadReceipt':
|
||||
var value = call.arguments['data']['groupMsgReceiptList'];
|
||||
var list = Utils.toList(value, (map) => ReadReceiptInfo.fromJson(map));
|
||||
var list =
|
||||
Utils.toList(value, (map) => ReadReceiptInfo.fromJson(map));
|
||||
messageManager.msgListener.recvGroupReadReceipt(list);
|
||||
break;
|
||||
case 'onRecvMessageExtensionsAdded':
|
||||
var msgID = call.arguments['data']['msgID'];
|
||||
var value = call.arguments['data']['reactionExtensionList'];
|
||||
var list = Utils.toList(value, (map) => KeyValue.fromJson(map));
|
||||
messageManager.msgListener.recvMessageExtensionsAdded(msgID, list);
|
||||
messageManager.msgListener
|
||||
.recvMessageExtensionsAdded(msgID, list);
|
||||
break;
|
||||
case 'onRecvMessageExtensionsChanged':
|
||||
var msgID = call.arguments['data']['msgID'];
|
||||
var value = call.arguments['data']['reactionExtensionList'];
|
||||
var list = Utils.toList(value, (map) => KeyValue.fromJson(map));
|
||||
messageManager.msgListener.recvMessageExtensionsChanged(msgID, list);
|
||||
messageManager.msgListener
|
||||
.recvMessageExtensionsChanged(msgID, list);
|
||||
break;
|
||||
case 'onRecvMessageExtensionsDeleted':
|
||||
var msgID = call.arguments['data']['msgID'];
|
||||
var value = call.arguments['data']['reactionExtensionKeyList'];
|
||||
var list = Utils.toList(value, (map) => '$map');
|
||||
messageManager.msgListener.recvMessageExtensionsDeleted(msgID, list);
|
||||
messageManager.msgListener
|
||||
.recvMessageExtensionsDeleted(msgID, list);
|
||||
break;
|
||||
|
||||
case 'onRecvNewMessage':
|
||||
@@ -199,15 +210,18 @@ class IMManager {
|
||||
conversationManager.listener.syncServerFailed();
|
||||
break;
|
||||
case 'onNewConversation':
|
||||
var list = Utils.toList(data, (map) => ConversationInfo.fromJson(map));
|
||||
var list =
|
||||
Utils.toList(data, (map) => ConversationInfo.fromJson(map));
|
||||
conversationManager.listener.newConversation(list);
|
||||
break;
|
||||
case 'onConversationChanged':
|
||||
var list = Utils.toList(data, (map) => ConversationInfo.fromJson(map));
|
||||
var list =
|
||||
Utils.toList(data, (map) => ConversationInfo.fromJson(map));
|
||||
conversationManager.listener.conversationChanged(list);
|
||||
break;
|
||||
case 'onTotalUnreadMessageCountChanged':
|
||||
conversationManager.listener.totalUnreadMessageCountChanged(data ?? 0);
|
||||
conversationManager.listener
|
||||
.totalUnreadMessageCountChanged(data ?? 0);
|
||||
break;
|
||||
}
|
||||
} else if (call.method == ListenerType.friendListener) {
|
||||
@@ -228,19 +242,23 @@ class IMManager {
|
||||
friendshipManager.listener.friendAdded(u);
|
||||
break;
|
||||
case 'onFriendApplicationAccepted':
|
||||
final u = Utils.toObj(data, (map) => FriendApplicationInfo.fromJson(map));
|
||||
final u = Utils.toObj(
|
||||
data, (map) => FriendApplicationInfo.fromJson(map));
|
||||
friendshipManager.listener.friendApplicationAccepted(u);
|
||||
break;
|
||||
case 'onFriendApplicationAdded':
|
||||
final u = Utils.toObj(data, (map) => FriendApplicationInfo.fromJson(map));
|
||||
final u = Utils.toObj(
|
||||
data, (map) => FriendApplicationInfo.fromJson(map));
|
||||
friendshipManager.listener.friendApplicationAdded(u);
|
||||
break;
|
||||
case 'onFriendApplicationDeleted':
|
||||
final u = Utils.toObj(data, (map) => FriendApplicationInfo.fromJson(map));
|
||||
final u = Utils.toObj(
|
||||
data, (map) => FriendApplicationInfo.fromJson(map));
|
||||
friendshipManager.listener.friendApplicationDeleted(u);
|
||||
break;
|
||||
case 'onFriendApplicationRejected':
|
||||
final u = Utils.toObj(data, (map) => FriendApplicationInfo.fromJson(map));
|
||||
final u = Utils.toObj(
|
||||
data, (map) => FriendApplicationInfo.fromJson(map));
|
||||
friendshipManager.listener.friendApplicationRejected(u);
|
||||
break;
|
||||
case 'onFriendDeleted':
|
||||
@@ -252,12 +270,71 @@ class IMManager {
|
||||
friendshipManager.listener.friendInfoChanged(u);
|
||||
break;
|
||||
}
|
||||
} else if (call.method == ListenerType.signalingListener) {
|
||||
String type = call.arguments['type'];
|
||||
dynamic data = call.arguments['data'];
|
||||
dynamic info;
|
||||
switch (type) {
|
||||
case 'onRoomParticipantConnected':
|
||||
case 'onRoomParticipantDisconnected':
|
||||
info = Utils.toObj(data, (map) => RoomCallingInfo.fromJson(map));
|
||||
break;
|
||||
case 'onStreamChange':
|
||||
info =
|
||||
Utils.toObj(data, (map) => MeetingStreamEvent.fromJson(map));
|
||||
break;
|
||||
case 'onReceiveCustomSignal':
|
||||
info = Utils.toObj(data, (map) => CustomSignaling.fromJson(map));
|
||||
break;
|
||||
default:
|
||||
info = Utils.toObj(data, (map) => SignalingInfo.fromJson(map));
|
||||
break;
|
||||
}
|
||||
switch (type) {
|
||||
case 'onInvitationCancelled':
|
||||
signalingManager.listener.invitationCancelled(info);
|
||||
break;
|
||||
case 'onInvitationTimeout':
|
||||
signalingManager.listener.invitationTimeout(info);
|
||||
break;
|
||||
case 'onInviteeAccepted':
|
||||
signalingManager.listener.inviteeAccepted(info);
|
||||
break;
|
||||
case 'onInviteeRejected':
|
||||
signalingManager.listener.inviteeRejected(info);
|
||||
break;
|
||||
case 'onReceiveNewInvitation':
|
||||
signalingManager.listener.receiveNewInvitation(info);
|
||||
break;
|
||||
case 'onInviteeAcceptedByOtherDevice':
|
||||
signalingManager.listener.inviteeAcceptedByOtherDevice(info);
|
||||
break;
|
||||
case 'onInviteeRejectedByOtherDevice':
|
||||
signalingManager.listener.inviteeRejectedByOtherDevice(info);
|
||||
break;
|
||||
case 'onHangUp':
|
||||
signalingManager.listener.hangup(info);
|
||||
break;
|
||||
case 'onRoomParticipantConnected':
|
||||
signalingManager.listener.roomParticipantConnected(info);
|
||||
break;
|
||||
case 'onRoomParticipantDisconnected':
|
||||
signalingManager.listener.roomParticipantDisconnected(info);
|
||||
break;
|
||||
case 'onStreamChange':
|
||||
signalingManager.listener.streamChangedEvent(info);
|
||||
break;
|
||||
case 'onReceiveCustomSignal':
|
||||
signalingManager.listener.receiveCustomSignal(info);
|
||||
break;
|
||||
}
|
||||
} else if (call.method == ListenerType.customBusinessListener) {
|
||||
String type = call.arguments['type'];
|
||||
String data = call.arguments['data'];
|
||||
switch (type) {
|
||||
case 'onRecvCustomBusinessMessage':
|
||||
messageManager.customBusinessListener?.recvCustomBusinessMessage(data);
|
||||
messageManager.customBusinessListener
|
||||
?.recvCustomBusinessMessage(data);
|
||||
break;
|
||||
}
|
||||
} else if (call.method == ListenerType.messageKvInfoListener) {
|
||||
@@ -265,7 +342,8 @@ class IMManager {
|
||||
String data = call.arguments['data'];
|
||||
switch (type) {
|
||||
case 'onMessageKvInfoChanged':
|
||||
final list = Utils.toList(data, (map) => MessageKv.fromJson(map)).toList();
|
||||
final list =
|
||||
Utils.toList(data, (map) => MessageKv.fromJson(map)).toList();
|
||||
messageManager.messageKvInfoListener?.messageKvInfoChanged(list);
|
||||
break;
|
||||
}
|
||||
@@ -274,19 +352,23 @@ class IMManager {
|
||||
String data = call.arguments['data'];
|
||||
switch (type) {
|
||||
case 'onFriendApplicationAccepted':
|
||||
final u = Utils.toObj(data, (map) => FriendApplicationInfo.fromJson(map));
|
||||
final u = Utils.toObj(
|
||||
data, (map) => FriendApplicationInfo.fromJson(map));
|
||||
_listenerForService?.friendApplicationAccepted(u);
|
||||
break;
|
||||
case 'onFriendApplicationAdded':
|
||||
final u = Utils.toObj(data, (map) => FriendApplicationInfo.fromJson(map));
|
||||
final u = Utils.toObj(
|
||||
data, (map) => FriendApplicationInfo.fromJson(map));
|
||||
_listenerForService?.friendApplicationAdded(u);
|
||||
break;
|
||||
case 'onGroupApplicationAccepted':
|
||||
final i = Utils.toObj(data, (map) => GroupApplicationInfo.fromJson(map));
|
||||
final i = Utils.toObj(
|
||||
data, (map) => GroupApplicationInfo.fromJson(map));
|
||||
_listenerForService?.groupApplicationAccepted(i);
|
||||
break;
|
||||
case 'onGroupApplicationAdded':
|
||||
final i = Utils.toObj(data, (map) => GroupApplicationInfo.fromJson(map));
|
||||
final i = Utils.toObj(
|
||||
data, (map) => GroupApplicationInfo.fromJson(map));
|
||||
_listenerForService?.groupApplicationAdded(i);
|
||||
break;
|
||||
case 'onRecvNewMessage':
|
||||
@@ -334,7 +416,8 @@ class IMManager {
|
||||
int fileSize = data['fileSize'];
|
||||
int streamSize = data['streamSize'];
|
||||
int storageSize = data['storageSize'];
|
||||
_uploadFileListener?.uploadProgress(id, fileSize, streamSize, storageSize);
|
||||
_uploadFileListener?.uploadProgress(
|
||||
id, fileSize, streamSize, storageSize);
|
||||
break;
|
||||
case 'uploadID':
|
||||
String id = data['id'];
|
||||
@@ -346,12 +429,14 @@ class IMManager {
|
||||
int index = data['index'];
|
||||
int partSize = data['partSize'];
|
||||
String partHash = data['partHash'];
|
||||
_uploadFileListener?.uploadPartComplete(id, index, partSize, partHash);
|
||||
_uploadFileListener?.uploadPartComplete(
|
||||
id, index, partSize, partHash);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (error, stackTrace) {
|
||||
Logger.print("回调失败了。${call.method} ${call.arguments['type']} ${call.arguments['data']} $error $stackTrace");
|
||||
Logger.print(
|
||||
"回调失败了。${call.method} ${call.arguments['type']} ${call.arguments['data']} $error $stackTrace");
|
||||
}
|
||||
return Future.value(null);
|
||||
});
|
||||
@@ -374,15 +459,16 @@ class IMManager {
|
||||
required OnConnectListener listener,
|
||||
int logLevel = 6,
|
||||
String objectStorage = 'cos',
|
||||
// String? encryptionKey,
|
||||
// bool isNeedEncryption = false,
|
||||
// bool isCompression = false,
|
||||
// bool isExternalExtensions = false,
|
||||
String? encryptionKey,
|
||||
bool isNeedEncryption = false,
|
||||
bool isCompression = false,
|
||||
bool isExternalExtensions = false,
|
||||
bool isLogStandardOutput = true,
|
||||
String? logFilePath,
|
||||
String? operationID,
|
||||
}) {
|
||||
this._connectListener = listener;
|
||||
this._objectStorage = objectStorage;
|
||||
return _channel.invokeMethod(
|
||||
'initSDK',
|
||||
_buildParam(
|
||||
@@ -393,10 +479,10 @@ class IMManager {
|
||||
"dataDir": dataDir,
|
||||
"logLevel": logLevel,
|
||||
"objectStorage": objectStorage,
|
||||
// "encryptionKey": encryptionKey,
|
||||
// "isNeedEncryption": isNeedEncryption,
|
||||
// "isCompression": isCompression,
|
||||
// "isExternalExtensions": isExternalExtensions,
|
||||
"encryptionKey": encryptionKey,
|
||||
"isNeedEncryption": isNeedEncryption,
|
||||
"isCompression": isCompression,
|
||||
"isExternalExtensions": isExternalExtensions,
|
||||
"isLogStandardOutput": isLogStandardOutput,
|
||||
"logFilePath": logFilePath,
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
@@ -404,11 +490,6 @@ class IMManager {
|
||||
));
|
||||
}
|
||||
|
||||
/// 反初始化SDK
|
||||
Future<dynamic> unInitSDK() {
|
||||
return _channel.invokeMethod('unInitSDK', _buildParam({}));
|
||||
}
|
||||
|
||||
/// 登录
|
||||
/// [userID] 用户id
|
||||
/// [token] 登录token,从业务服务器上获取
|
||||
|
||||
@@ -531,7 +531,8 @@ class MessageManager {
|
||||
},
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toObj(value, (map) => SearchResult.fromJson(map)));
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => SearchResult.fromJson(map)));
|
||||
|
||||
/// 撤回消息
|
||||
/// [message] 被撤回的消息体
|
||||
@@ -586,7 +587,8 @@ class MessageManager {
|
||||
'lastMinSeq': lastMinSeq ?? 0,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toObj(value, (map) => AdvancedMessage.fromJson(map)));
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => AdvancedMessage.fromJson(map)));
|
||||
|
||||
/// 获取聊天记录(以startMsg为节点,新收到的聊天记录),用在全局搜索定位某一条消息,然后此条消息后新增的消息
|
||||
/// [conversationID] 会话id,查询通知时可用
|
||||
@@ -609,7 +611,8 @@ class MessageManager {
|
||||
'lastMinSeq': lastMinSeq ?? 0,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toObj(value, (map) => AdvancedMessage.fromJson(map)));
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => AdvancedMessage.fromJson(map)));
|
||||
|
||||
/// 查找消息详细
|
||||
/// [conversationID] 会话id
|
||||
@@ -625,7 +628,8 @@ class MessageManager {
|
||||
'searchParams': searchParams.map((e) => e.toJson()).toList(),
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toObj(value, (map) => SearchResult.fromJson(map)));
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => SearchResult.fromJson(map)));
|
||||
|
||||
/// 富文本消息
|
||||
/// [text] 输入内容
|
||||
@@ -759,22 +763,6 @@ class MessageManager {
|
||||
return _channel.invokeMethod('setCustomBusinessListener', _buildParam({}));
|
||||
}
|
||||
|
||||
Future setMessageLocalEx({
|
||||
required String conversationID,
|
||||
required String clientMsgID,
|
||||
required String localEx,
|
||||
String? operationID,
|
||||
}) {
|
||||
return _channel.invokeMethod(
|
||||
'setMessageLocalEx',
|
||||
_buildParam({
|
||||
"conversationID": conversationID,
|
||||
"clientMsgID": clientMsgID,
|
||||
"localEx": localEx,
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}));
|
||||
}
|
||||
|
||||
///
|
||||
Future setMessageKvInfoListener(OnMessageKvInfoListener listener) {
|
||||
this.messageKvInfoListener = listener;
|
||||
@@ -794,7 +782,8 @@ class MessageManager {
|
||||
'list': list.map((e) => e.toJson()).toList(),
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => TypeKeySetResult.fromJson(map)));
|
||||
.then((value) =>
|
||||
Utils.toList(value, (map) => TypeKeySetResult.fromJson(map)));
|
||||
|
||||
Future<List<TypeKeySetResult>> deleteMessageReactionExtensions({
|
||||
required Message message,
|
||||
@@ -809,7 +798,8 @@ class MessageManager {
|
||||
'list': list,
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => TypeKeySetResult.fromJson(map)));
|
||||
.then((value) =>
|
||||
Utils.toList(value, (map) => TypeKeySetResult.fromJson(map)));
|
||||
|
||||
Future<List<MessageTypeKeyMapping>> getMessageListReactionExtensions({
|
||||
List<Message> messageList = const [],
|
||||
@@ -822,7 +812,8 @@ class MessageManager {
|
||||
'messageList': messageList.map((e) => e.toJson()).toList(),
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => MessageTypeKeyMapping.fromJson(map)));
|
||||
.then((value) => Utils.toList(
|
||||
value, (map) => MessageTypeKeyMapping.fromJson(map)));
|
||||
|
||||
Future<List<TypeKeySetResult>> addMessageReactionExtensions({
|
||||
required Message message,
|
||||
@@ -837,7 +828,8 @@ class MessageManager {
|
||||
'list': list.map((e) => e.toJson()).toList(),
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => TypeKeySetResult.fromJson(map)));
|
||||
.then((value) =>
|
||||
Utils.toList(value, (map) => TypeKeySetResult.fromJson(map)));
|
||||
|
||||
Future<List<MessageTypeKeyMapping>> getMessageListSomeReactionExtensions({
|
||||
List<Message> messageList = const [],
|
||||
@@ -852,7 +844,8 @@ class MessageManager {
|
||||
'list': kvList.map((e) => e.toJson()).toList(),
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => MessageTypeKeyMapping.fromJson(map)));
|
||||
.then((value) => Utils.toList(
|
||||
value, (map) => MessageTypeKeyMapping.fromJson(map)));
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "messageManager";
|
||||
|
||||
319
lib/src/manager/im_signaling_manager.dart
Normal file
319
lib/src/manager/im_signaling_manager.dart
Normal file
@@ -0,0 +1,319 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../../flutter_openim_sdk.dart';
|
||||
|
||||
class SignalingManager {
|
||||
MethodChannel _channel;
|
||||
late OnSignalingListener listener;
|
||||
|
||||
SignalingManager(this._channel);
|
||||
|
||||
/// 信令监听
|
||||
Future setSignalingListener(OnSignalingListener listener) {
|
||||
this.listener = listener;
|
||||
return _channel.invokeMethod('setSignalingListener', _buildParam({}));
|
||||
}
|
||||
|
||||
/// 邀请个人加入音视频
|
||||
/// [info] 信令对象[SignalingInfo]
|
||||
Future<SignalingCertificate> signalingInvite({
|
||||
required SignalingInfo info,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'signalingInvite',
|
||||
_buildParam({
|
||||
'signalingInfo': info.toJson(),
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => SignalingCertificate.fromJson(map)));
|
||||
|
||||
/// 邀请群里某些人加入音视频
|
||||
/// [info] 信令对象[SignalingInfo]
|
||||
Future<SignalingCertificate> signalingInviteInGroup({
|
||||
required SignalingInfo info,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'signalingInviteInGroup',
|
||||
_buildParam({
|
||||
'signalingInfo': info.toJson(),
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => SignalingCertificate.fromJson(map)));
|
||||
|
||||
/// 同意某人音视频邀请
|
||||
/// [info] 信令对象[SignalingInfo]
|
||||
Future<SignalingCertificate> signalingAccept({
|
||||
required SignalingInfo info,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'signalingAccept',
|
||||
_buildParam({
|
||||
'signalingInfo': info.toJson(),
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => SignalingCertificate.fromJson(map)));
|
||||
|
||||
/// 拒绝某人音视频邀请
|
||||
/// [info] 信令对象[SignalingInfo]
|
||||
Future<dynamic> signalingReject({
|
||||
required SignalingInfo info,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'signalingReject',
|
||||
_buildParam({
|
||||
'signalingInfo': info.toJson(),
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// 邀请者取消音视频通话
|
||||
/// [info] 信令对象[SignalingInfo]
|
||||
Future<dynamic> signalingCancel({
|
||||
required SignalingInfo info,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'signalingCancel',
|
||||
_buildParam({
|
||||
'signalingInfo': info.toJson(),
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// 挂断
|
||||
/// [info] 信令对象[SignalingInfo]
|
||||
Future<dynamic> signalingHungUp({
|
||||
required SignalingInfo info,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'signalingHungUp',
|
||||
_buildParam({
|
||||
'signalingInfo': info.toJson(),
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// 获取当前群通话信息
|
||||
/// [groupID] 当前群ID
|
||||
Future<RoomCallingInfo> signalingGetRoomByGroupID({
|
||||
required String groupID,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'signalingGetRoomByGroupID',
|
||||
_buildParam({
|
||||
'groupID': groupID,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => RoomCallingInfo.fromJson(map)));
|
||||
|
||||
/// 获取进入房间的信息
|
||||
/// [roomID] 当前房间ID
|
||||
Future<SignalingCertificate> signalingGetTokenByRoomID({
|
||||
required String roomID,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'signalingGetTokenByRoomID',
|
||||
_buildParam({
|
||||
'roomID': roomID,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toObj(
|
||||
value,
|
||||
(map) => SignalingCertificate.fromJson(
|
||||
map..addAll({'roomID': roomID}))));
|
||||
|
||||
/// 会议设置
|
||||
/// required String roomID,
|
||||
/// String? meetingName,
|
||||
/// String? ex,
|
||||
/// int startTime = 0,
|
||||
/// int endTime = 0,
|
||||
/// bool participantCanUnmuteSelf = true,
|
||||
/// bool participantCanEnableVideo = true,
|
||||
/// bool onlyHostInviteUser = true,
|
||||
/// bool onlyHostShareScreen = true,
|
||||
/// bool joinDisableMicrophone = true,
|
||||
/// bool joinDisableVideo = true,
|
||||
/// bool isMuteAllVideo = true,
|
||||
/// bool isMuteAllMicrophone = true,
|
||||
/// List<String> addCanScreenUserIDList = const [],
|
||||
/// List<String> reduceCanScreenUserIDList = const [],
|
||||
/// List<String> addDisableMicrophoneUserIDList = const [],
|
||||
/// List<String> reduceDisableMicrophoneUserIDList = const [],
|
||||
/// List<String> addDisableVideoUserIDList = const [],
|
||||
/// List<String> reduceDisableVideoUserIDList = const [],
|
||||
/// List<String> addPinedUserIDList = const [],
|
||||
/// List<String> reducePinedUserIDList = const [],
|
||||
/// List<String> addBeWatchedUserIDList = const [],
|
||||
/// List<String> reduceBeWatchedUserIDList = const [],
|
||||
Future<dynamic> signalingUpdateMeetingInfo({
|
||||
required Map info,
|
||||
String? operationID,
|
||||
}) {
|
||||
if (info['meetingID'] != null) {
|
||||
info['roomID'] = info['meetingID'];
|
||||
}
|
||||
assert(info['roomID'] != null);
|
||||
return _channel.invokeMethod(
|
||||
'signalingUpdateMeetingInfo',
|
||||
_buildParam({
|
||||
'info': info,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
}
|
||||
|
||||
/// 创建会议室
|
||||
/// [meetingName] 会议主题
|
||||
/// [meetingHostUserID] 会议主持人ID
|
||||
/// [startTime] 开始时间s
|
||||
/// [meetingDuration] 会议时长s
|
||||
/// [inviteeUserIDList] 被邀请人ID列表
|
||||
/// [ex] 其他
|
||||
Future<SignalingCertificate> signalingCreateMeeting({
|
||||
required String meetingName,
|
||||
String? meetingHostUserID,
|
||||
int? startTime,
|
||||
int? meetingDuration,
|
||||
List<String> inviteeUserIDList = const [],
|
||||
String? ex,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'signalingCreateMeeting',
|
||||
_buildParam({
|
||||
'info': {
|
||||
'meetingName': meetingName,
|
||||
'meetingHostUserID': meetingHostUserID,
|
||||
'startTime': startTime,
|
||||
'meetingDuration': meetingDuration,
|
||||
'inviteeUserIDList': inviteeUserIDList,
|
||||
'ex': ex,
|
||||
},
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => SignalingCertificate.fromJson(map)));
|
||||
|
||||
/// 加入会议室
|
||||
/// [roomID] 会议ID
|
||||
/// [meetingName] 会议主题
|
||||
/// [participantNickname] 加入房间显示的名称
|
||||
Future<SignalingCertificate> signalingJoinMeeting({
|
||||
required String roomID,
|
||||
String? meetingName,
|
||||
String? participantNickname,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'signalingJoinMeeting',
|
||||
_buildParam({
|
||||
'info': {
|
||||
'roomID': roomID,
|
||||
'meetingName': meetingName,
|
||||
'participantNickname': participantNickname,
|
||||
},
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => SignalingCertificate.fromJson(map)));
|
||||
|
||||
/// 会议室 管理员对指定的某一个入会人员设置禁言
|
||||
/// [roomID] 会议ID
|
||||
/// [streamType] video/audio
|
||||
/// [userID] 被禁言的用户ID
|
||||
/// [mute] true:禁言
|
||||
/// [muteAll] true:video/audio 一起设置
|
||||
Future<dynamic> signalingOperateStream({
|
||||
required String roomID,
|
||||
String? streamType,
|
||||
required String userID,
|
||||
bool mute = false,
|
||||
bool muteAll = false,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'signalingOperateStream',
|
||||
_buildParam({
|
||||
'roomID': roomID,
|
||||
'streamType': streamType,
|
||||
'userID': userID,
|
||||
'mute': mute,
|
||||
'muteAll': muteAll,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// 获取所有的未完成会议
|
||||
/// [roomID] 会议ID
|
||||
Future<MeetingInfoList> signalingGetMeetings({
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'signalingGetMeetings',
|
||||
_buildParam({
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => MeetingInfoList.fromJson(map)));
|
||||
|
||||
/// 结束会议
|
||||
/// [roomID] 会议ID
|
||||
Future<dynamic> signalingCloseRoom({
|
||||
required String roomID,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'signalingCloseRoom',
|
||||
_buildParam({
|
||||
'roomID': roomID,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// 自定义信令
|
||||
/// [roomID] 会议ID
|
||||
/// [customInfo] 自定义信令
|
||||
Future<dynamic> signalingSendCustomSignal({
|
||||
required String roomID,
|
||||
required String customInfo,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'signalingSendCustomSignal',
|
||||
_buildParam({
|
||||
'roomID': roomID,
|
||||
'customInfo': customInfo,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
Future<SignalingInfo> getSignalingInvitationInfoStartApp({
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'getSignalingInvitationInfoStartApp',
|
||||
_buildParam({
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (map) => SignalingInfo.fromJson(map)));
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "signalingManager";
|
||||
return param;
|
||||
}
|
||||
}
|
||||
@@ -75,76 +75,6 @@ class UserManager {
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
Future<List<UserStatusInfo>> subscribeUsersStatus(
|
||||
List<String> userIDs, {
|
||||
String? operationID,
|
||||
}) {
|
||||
return _channel
|
||||
.invokeMethod(
|
||||
'subscribeUsersStatus',
|
||||
_buildParam({
|
||||
'userIDs': userIDs,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => UserStatusInfo.fromJson(map)));
|
||||
}
|
||||
|
||||
Future<List<UserStatusInfo>> unsubscribeUsersStatus(
|
||||
List<String> userIDs, {
|
||||
String? operationID,
|
||||
}) {
|
||||
return _channel
|
||||
.invokeMethod(
|
||||
'unsubscribeUsersStatus',
|
||||
_buildParam({
|
||||
'userIDs': userIDs,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => UserStatusInfo.fromJson(map)));
|
||||
}
|
||||
|
||||
Future<List<UserStatusInfo>> getSubscribeUsersStatus({
|
||||
String? operationID,
|
||||
}) {
|
||||
return _channel
|
||||
.invokeMethod(
|
||||
'getSubscribeUsersStatus',
|
||||
_buildParam({
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => UserStatusInfo.fromJson(map)));
|
||||
}
|
||||
|
||||
Future<List<UserStatusInfo>> getUserStatus(
|
||||
List<String> userIDs, {
|
||||
String? operationID,
|
||||
}) {
|
||||
return _channel
|
||||
.invokeMethod(
|
||||
'getUserStatus',
|
||||
_buildParam({
|
||||
'userIDs': userIDs,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => UserStatusInfo.fromJson(map)));
|
||||
}
|
||||
|
||||
Future<List<UserInfo>> getUsersInfoStranger(
|
||||
List<String> userIDs, {
|
||||
String? groupID,
|
||||
String? operationID,
|
||||
}) {
|
||||
return _channel
|
||||
.invokeMethod(
|
||||
'getUsersInfoStranger',
|
||||
_buildParam({
|
||||
'userIDs': userIDs,
|
||||
'groupID': groupID,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => UserInfo.fromJson(map)));
|
||||
}
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "userManager";
|
||||
return param;
|
||||
|
||||
@@ -31,7 +31,7 @@ class Message {
|
||||
int? contentType;
|
||||
|
||||
/// 平台[Platform]
|
||||
int? senderPlatformID;
|
||||
int? platformID;
|
||||
|
||||
/// 发送者昵称
|
||||
String? senderNickname;
|
||||
@@ -131,7 +131,7 @@ class Message {
|
||||
this.recvID,
|
||||
this.msgFrom,
|
||||
this.contentType,
|
||||
this.senderPlatformID,
|
||||
this.platformID,
|
||||
this.senderNickname,
|
||||
this.senderFaceUrl,
|
||||
this.groupID,
|
||||
@@ -173,7 +173,7 @@ class Message {
|
||||
recvID = json['recvID'];
|
||||
msgFrom = json['msgFrom'];
|
||||
contentType = json['contentType'];
|
||||
senderPlatformID = json['senderPlatformID'];
|
||||
platformID = json['platformID'];
|
||||
senderNickname = json['senderNickname'];
|
||||
senderFaceUrl = json['senderFaceUrl'];
|
||||
groupID = json['groupID'];
|
||||
@@ -248,7 +248,7 @@ class Message {
|
||||
data['recvID'] = this.recvID;
|
||||
data['msgFrom'] = this.msgFrom;
|
||||
data['contentType'] = this.contentType;
|
||||
data['senderPlatformID'] = this.senderPlatformID;
|
||||
data['platformID'] = this.platformID;
|
||||
data['senderNickname'] = this.senderNickname;
|
||||
data['senderFaceUrl'] = this.senderFaceUrl;
|
||||
data['groupID'] = this.groupID;
|
||||
@@ -302,7 +302,7 @@ class Message {
|
||||
recvID = message.recvID;
|
||||
msgFrom = message.msgFrom;
|
||||
contentType = message.contentType;
|
||||
senderPlatformID = message.senderPlatformID;
|
||||
platformID = message.platformID;
|
||||
senderNickname = message.senderNickname;
|
||||
senderFaceUrl = message.senderFaceUrl;
|
||||
groupID = message.groupID;
|
||||
|
||||
381
lib/src/models/organization_info.dart
Normal file
381
lib/src/models/organization_info.dart
Normal file
@@ -0,0 +1,381 @@
|
||||
/// 部门信息
|
||||
class DeptInfo {
|
||||
/// 部门id
|
||||
String? departmentID;
|
||||
|
||||
/// 头像
|
||||
String? faceURL;
|
||||
|
||||
/// 显示名
|
||||
String? name;
|
||||
|
||||
/// 上一级部门id
|
||||
String? parentID;
|
||||
|
||||
/// 排序方式
|
||||
int? order;
|
||||
|
||||
/// 部门类型
|
||||
int? departmentType;
|
||||
|
||||
/// 创建时间
|
||||
int? createTime;
|
||||
|
||||
/// 子部门数量
|
||||
int? subDepartmentNum;
|
||||
|
||||
/// 成员数量
|
||||
int? memberNum;
|
||||
|
||||
/// 扩展字段
|
||||
String? ex;
|
||||
|
||||
/// 附加信息
|
||||
String? attachedInfo;
|
||||
|
||||
String? relatedGroupID;
|
||||
|
||||
DeptInfo(
|
||||
{this.departmentID,
|
||||
this.faceURL,
|
||||
this.name,
|
||||
this.parentID,
|
||||
this.order,
|
||||
this.departmentType,
|
||||
this.createTime,
|
||||
this.subDepartmentNum,
|
||||
this.memberNum,
|
||||
this.ex,
|
||||
this.attachedInfo,
|
||||
this.relatedGroupID});
|
||||
|
||||
DeptInfo.fromJson(Map<String, dynamic> json) {
|
||||
departmentID = json['departmentID'];
|
||||
faceURL = json['faceURL'];
|
||||
name = json['name'];
|
||||
parentID = json['parentID'];
|
||||
order = json['order'];
|
||||
departmentType = json['departmentType'];
|
||||
createTime = json['createTime'];
|
||||
subDepartmentNum = json['subDepartmentNum'];
|
||||
memberNum = json['memberNum'];
|
||||
ex = json['ex'];
|
||||
attachedInfo = json['attachedInfo'];
|
||||
relatedGroupID = json['relatedGroupID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
data['departmentID'] = this.departmentID;
|
||||
data['faceURL'] = this.faceURL;
|
||||
data['name'] = this.name;
|
||||
data['parentID'] = this.parentID;
|
||||
data['order'] = this.order;
|
||||
data['departmentType'] = this.departmentType;
|
||||
data['createTime'] = this.createTime;
|
||||
data['subDepartmentNum'] = this.subDepartmentNum;
|
||||
data['memberNum'] = this.memberNum;
|
||||
data['ex'] = this.ex;
|
||||
data['attachedInfo'] = this.attachedInfo;
|
||||
data['relatedGroupID'] = this.relatedGroupID;
|
||||
return data;
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is DeptInfo &&
|
||||
runtimeType == other.runtimeType &&
|
||||
departmentID == other.departmentID;
|
||||
|
||||
@override
|
||||
int get hashCode => departmentID.hashCode;
|
||||
}
|
||||
|
||||
/// 部门成员信息
|
||||
class DeptMemberInfo {
|
||||
/// 用户id
|
||||
String? userID;
|
||||
|
||||
/// 用户昵称
|
||||
String? nickname;
|
||||
|
||||
/// 英文名
|
||||
String? englishName;
|
||||
|
||||
/// 头像
|
||||
String? faceURL;
|
||||
|
||||
/// 性别
|
||||
int? gender;
|
||||
|
||||
/// 手机号
|
||||
String? mobile;
|
||||
|
||||
/// 座机
|
||||
String? telephone;
|
||||
|
||||
/// 出生时间
|
||||
int? birth;
|
||||
|
||||
/// 邮箱
|
||||
String? email;
|
||||
|
||||
/// 所在部门的id
|
||||
String? departmentID;
|
||||
|
||||
/// 排序方式
|
||||
int? order;
|
||||
|
||||
/// 职位
|
||||
String? position;
|
||||
|
||||
/// 是否是领导
|
||||
int? leader;
|
||||
|
||||
/// 状态
|
||||
int? status;
|
||||
|
||||
/// 创建时间
|
||||
int? createTime;
|
||||
|
||||
/// 入职时间
|
||||
int? entryTime;
|
||||
|
||||
/// 离职时间
|
||||
int? terminationTime;
|
||||
|
||||
/// 扩展字段
|
||||
String? ex;
|
||||
|
||||
/// 附加信息
|
||||
String? attachedInfo;
|
||||
|
||||
/// 搜索时使用
|
||||
String? departmentName;
|
||||
|
||||
/// 所在部门的所有上级部门
|
||||
List<DeptInfo>? parentDepartmentList;
|
||||
|
||||
/// 当前部门信息
|
||||
DeptInfo? department;
|
||||
|
||||
DeptMemberInfo({
|
||||
this.userID,
|
||||
this.nickname,
|
||||
this.englishName,
|
||||
this.faceURL,
|
||||
this.gender,
|
||||
this.mobile,
|
||||
this.telephone,
|
||||
this.birth,
|
||||
this.email,
|
||||
this.departmentID,
|
||||
this.order,
|
||||
this.position,
|
||||
this.leader,
|
||||
this.status,
|
||||
this.createTime,
|
||||
this.ex,
|
||||
this.attachedInfo,
|
||||
this.departmentName,
|
||||
this.parentDepartmentList,
|
||||
this.department,
|
||||
});
|
||||
|
||||
DeptMemberInfo.fromJson(Map<String, dynamic> json) {
|
||||
userID = json['userID'];
|
||||
nickname = json['nickname'];
|
||||
englishName = json['englishName'];
|
||||
faceURL = json['faceURL'];
|
||||
gender = json['gender'];
|
||||
mobile = json['mobile'];
|
||||
telephone = json['telephone'];
|
||||
birth = json['birth'];
|
||||
email = json['email'];
|
||||
departmentID = json['departmentID'];
|
||||
order = json['order'];
|
||||
position = json['position'];
|
||||
leader = json['leader'];
|
||||
status = json['status'];
|
||||
createTime = json['createTime'];
|
||||
ex = json['ex'];
|
||||
attachedInfo = json['attachedInfo'];
|
||||
departmentName = json['departmentName'];
|
||||
if (json['parentDepartmentList'] != null) {
|
||||
parentDepartmentList = <DeptInfo>[];
|
||||
json['parentDepartmentList'].forEach((v) {
|
||||
parentDepartmentList!.add(DeptInfo.fromJson(v));
|
||||
});
|
||||
}
|
||||
department = json['department'] == null
|
||||
? null
|
||||
: DeptInfo.fromJson(json['department']);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['userID'] = this.userID;
|
||||
data['nickname'] = this.nickname;
|
||||
data['englishName'] = this.englishName;
|
||||
data['faceURL'] = this.faceURL;
|
||||
data['gender'] = this.gender;
|
||||
data['mobile'] = this.mobile;
|
||||
data['telephone'] = this.telephone;
|
||||
data['birth'] = this.birth;
|
||||
data['email'] = this.email;
|
||||
data['departmentID'] = this.departmentID;
|
||||
data['order'] = this.order;
|
||||
data['position'] = this.position;
|
||||
data['leader'] = this.leader;
|
||||
data['status'] = this.status;
|
||||
data['createTime'] = this.createTime;
|
||||
data['ex'] = this.ex;
|
||||
data['attachedInfo'] = this.attachedInfo;
|
||||
data['departmentName'] = this.departmentName;
|
||||
if (this.parentDepartmentList != null) {
|
||||
data['parentDepartmentList'] =
|
||||
this.parentDepartmentList!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['department'] = this.department?.toJson();
|
||||
return data;
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is DeptMemberInfo &&
|
||||
runtimeType == other.runtimeType &&
|
||||
userID == other.userID;
|
||||
|
||||
@override
|
||||
int get hashCode => userID.hashCode;
|
||||
}
|
||||
|
||||
/// 用户所在的部门
|
||||
class UserInDept {
|
||||
/// 部门信息
|
||||
DeptInfo? department;
|
||||
|
||||
/// 所在部门自己的信息
|
||||
DeptMemberInfo? member;
|
||||
|
||||
UserInDept({this.department, this.member});
|
||||
|
||||
UserInDept.fromJson(Map<String, dynamic> json) {
|
||||
department = json['department'] != null
|
||||
? DeptInfo.fromJson(json['department'])
|
||||
: null;
|
||||
member =
|
||||
json['member'] != null ? DeptMemberInfo.fromJson(json['member']) : null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
if (this.department != null) {
|
||||
data['department'] = this.department!.toJson();
|
||||
}
|
||||
if (this.member != null) {
|
||||
data['member'] = this.member!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// 部门下的一级子部门跟员工
|
||||
class DeptMemberAndSubDept {
|
||||
/// 一级子部门
|
||||
List<DeptInfo>? departmentList;
|
||||
|
||||
/// 一级成员
|
||||
List<DeptMemberInfo>? departmentMemberList;
|
||||
|
||||
/// 当前部门的所有上一级部门
|
||||
List<DeptInfo>? parentDepartmentList;
|
||||
|
||||
DeptMemberAndSubDept({
|
||||
this.departmentList,
|
||||
this.departmentMemberList,
|
||||
this.parentDepartmentList,
|
||||
});
|
||||
|
||||
DeptMemberAndSubDept.fromJson(Map<String, dynamic> json) {
|
||||
if (json['departmentList'] != null) {
|
||||
departmentList = <DeptInfo>[];
|
||||
json['departmentList'].forEach((v) {
|
||||
departmentList!.add(DeptInfo.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['departmentMemberList'] != null) {
|
||||
departmentMemberList = <DeptMemberInfo>[];
|
||||
json['departmentMemberList'].forEach((v) {
|
||||
departmentMemberList!.add(DeptMemberInfo.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['parentDepartmentList'] != null) {
|
||||
parentDepartmentList = <DeptInfo>[];
|
||||
json['parentDepartmentList'].forEach((v) {
|
||||
parentDepartmentList!.add(DeptInfo.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
if (this.departmentList != null) {
|
||||
data['departmentList'] =
|
||||
this.departmentList!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.departmentMemberList != null) {
|
||||
data['departmentMemberList'] =
|
||||
this.departmentMemberList!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.parentDepartmentList != null) {
|
||||
data['parentDepartmentList'] =
|
||||
this.parentDepartmentList!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// 搜索结果
|
||||
class OrganizationSearchResult {
|
||||
/// 部门列表
|
||||
List<DeptInfo>? departmentList;
|
||||
|
||||
/// 部门成员列表
|
||||
List<DeptMemberInfo>? departmentMemberList;
|
||||
|
||||
OrganizationSearchResult({
|
||||
this.departmentList,
|
||||
this.departmentMemberList,
|
||||
});
|
||||
|
||||
OrganizationSearchResult.fromJson(Map<String, dynamic> json) {
|
||||
if (json['departmentList'] != null) {
|
||||
departmentList = <DeptInfo>[];
|
||||
json['departmentList'].forEach((v) {
|
||||
departmentList!.add(DeptInfo.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['departmentMemberList'] != null) {
|
||||
departmentMemberList = <DeptMemberInfo>[];
|
||||
json['departmentMemberList'].forEach((v) {
|
||||
departmentMemberList!.add(DeptMemberInfo.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
if (this.departmentList != null) {
|
||||
data['departmentList'] =
|
||||
this.departmentList!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.departmentMemberList != null) {
|
||||
data['departmentMemberList'] =
|
||||
this.departmentMemberList!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
245
lib/src/models/signaling_info.dart
Normal file
245
lib/src/models/signaling_info.dart
Normal file
@@ -0,0 +1,245 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
|
||||
class SignalingInfo {
|
||||
/// 操作者
|
||||
String? userID;
|
||||
|
||||
/// 邀请信息
|
||||
InvitationInfo? invitation;
|
||||
|
||||
/// 离线显示内容
|
||||
OfflinePushInfo? offlinePushInfo;
|
||||
|
||||
SignalingInfo({
|
||||
this.userID,
|
||||
this.invitation,
|
||||
this.offlinePushInfo,
|
||||
});
|
||||
|
||||
SignalingInfo.fromJson(Map<String, dynamic> json) {
|
||||
invitation = json['invitation'] == null
|
||||
? null
|
||||
: InvitationInfo.fromJson(json['invitation']);
|
||||
offlinePushInfo = json['offlinePushInfo'] == null
|
||||
? null
|
||||
: OfflinePushInfo.fromJson(json['offlinePushInfo']);
|
||||
userID = json['userID'] ?? invitation?.inviterUserID;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
data['userID'] = this.userID;
|
||||
data['invitation'] = this.invitation?.toJson();
|
||||
data['offlinePushInfo'] = this.offlinePushInfo?.toJson();
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class InvitationInfo {
|
||||
/// 邀请者UserID
|
||||
String? inviterUserID;
|
||||
|
||||
/// 被邀请者UserID列表,如果是单聊只有一个元素
|
||||
List<String>? inviteeUserIDList;
|
||||
|
||||
/// 如果是单聊,为""
|
||||
String? groupID;
|
||||
|
||||
/// 房间ID,必须唯一,可以不设置。
|
||||
String? roomID;
|
||||
|
||||
/// 邀请超时时间(秒)
|
||||
int? timeout;
|
||||
|
||||
/// 发起时间
|
||||
int? initiateTime;
|
||||
|
||||
/// video 或者 audio
|
||||
String? mediaType;
|
||||
|
||||
/// [ConversationType]1为单聊,2为群聊
|
||||
int? sessionType;
|
||||
|
||||
/// 平台[Platform]
|
||||
int? platformID;
|
||||
|
||||
InvitationInfo(
|
||||
{this.inviterUserID,
|
||||
this.inviteeUserIDList,
|
||||
this.groupID,
|
||||
this.roomID,
|
||||
this.timeout,
|
||||
this.initiateTime,
|
||||
this.mediaType,
|
||||
this.sessionType,
|
||||
this.platformID});
|
||||
|
||||
InvitationInfo.fromJson(Map<String, dynamic> json) {
|
||||
inviterUserID = json['inviterUserID'];
|
||||
inviteeUserIDList = json['inviteeUserIDList']?.cast<String>();
|
||||
groupID = json['groupID'];
|
||||
roomID = json['roomID'];
|
||||
timeout = json['timeout'];
|
||||
initiateTime = json['initiateTime'];
|
||||
mediaType = json['mediaType'];
|
||||
sessionType = json['sessionType'];
|
||||
platformID = json['platformID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
data['inviterUserID'] = this.inviterUserID;
|
||||
data['inviteeUserIDList'] = this.inviteeUserIDList;
|
||||
data['groupID'] = this.groupID;
|
||||
data['roomID'] = this.roomID;
|
||||
data['timeout'] = this.timeout;
|
||||
data['initiateTime'] = this.initiateTime;
|
||||
data['mediaType'] = this.mediaType;
|
||||
data['sessionType'] = this.sessionType;
|
||||
data['platformID'] = this.platformID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// 信令凭证
|
||||
class SignalingCertificate {
|
||||
/// 登录token
|
||||
String? token;
|
||||
|
||||
/// 房间id
|
||||
String? roomID;
|
||||
|
||||
/// 服务器地址
|
||||
String? liveURL;
|
||||
|
||||
/// 占线列表
|
||||
List<String>? busyLineUserIDList;
|
||||
|
||||
SignalingCertificate({
|
||||
this.token,
|
||||
this.roomID,
|
||||
this.liveURL,
|
||||
this.busyLineUserIDList,
|
||||
});
|
||||
|
||||
SignalingCertificate.fromJson(Map<String, dynamic> json) {
|
||||
token = json['token'];
|
||||
roomID = json['roomID'];
|
||||
liveURL = json['liveURL'];
|
||||
busyLineUserIDList = null == json['busyLineUserIDList']
|
||||
? null
|
||||
: json['busyLineUserIDList'].cast<String>();
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
data['token'] = this.token;
|
||||
data['roomID'] = this.roomID;
|
||||
data['liveURL'] = this.liveURL;
|
||||
data['busyLineUserIDList'] = this.busyLineUserIDList;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class RoomCallingInfo {
|
||||
InvitationInfo? invitation;
|
||||
List<Participant>? participant;
|
||||
String? roomID;
|
||||
String? token;
|
||||
String? liveURL;
|
||||
String? groupID;
|
||||
|
||||
RoomCallingInfo({
|
||||
this.invitation,
|
||||
this.participant,
|
||||
this.roomID,
|
||||
this.token,
|
||||
this.liveURL,
|
||||
this.groupID,
|
||||
});
|
||||
|
||||
RoomCallingInfo.fromJson(Map<String, dynamic> json) {
|
||||
invitation = json['invitation'] != null
|
||||
? InvitationInfo.fromJson(json['invitation'])
|
||||
: null;
|
||||
if (json['participant'] != null) {
|
||||
participant = <Participant>[];
|
||||
json['participant'].forEach((v) {
|
||||
participant!.add(Participant.fromJson(v));
|
||||
});
|
||||
}
|
||||
roomID = json['roomID'] ?? invitation?.roomID;
|
||||
token = json['token'];
|
||||
liveURL = json['liveURL'];
|
||||
groupID = json['groupID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
if (this.invitation != null) {
|
||||
data['invitation'] = this.invitation!.toJson();
|
||||
}
|
||||
if (this.participant != null) {
|
||||
data['participant'] = this.participant!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['roomID'] = this.roomID;
|
||||
data['token'] = this.token;
|
||||
data['liveURL'] = this.liveURL;
|
||||
data['groupID'] = this.groupID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Participant {
|
||||
GroupInfo? groupInfo;
|
||||
GroupMembersInfo? groupMemberInfo;
|
||||
UserInfo? userInfo;
|
||||
|
||||
Participant({this.groupInfo, this.groupMemberInfo, this.userInfo});
|
||||
|
||||
Participant.fromJson(Map<String, dynamic> json) {
|
||||
groupInfo = json['groupInfo'] != null
|
||||
? GroupInfo.fromJson(json['groupInfo'])
|
||||
: null;
|
||||
groupMemberInfo = json['groupMemberInfo'] != null
|
||||
? GroupMembersInfo.fromJson(json['groupMemberInfo'])
|
||||
: null;
|
||||
userInfo =
|
||||
json['userInfo'] != null ? UserInfo.fromJson(json['userInfo']) : null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
if (this.groupInfo != null) {
|
||||
data['groupInfo'] = this.groupInfo!.toJson();
|
||||
}
|
||||
if (this.groupMemberInfo != null) {
|
||||
data['groupMemberInfo'] = this.groupMemberInfo!.toJson();
|
||||
}
|
||||
if (this.userInfo != null) {
|
||||
data['userInfo'] = this.userInfo!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class CustomSignaling {
|
||||
String? roomID;
|
||||
String? customInfo;
|
||||
|
||||
CustomSignaling({this.roomID, this.customInfo});
|
||||
|
||||
CustomSignaling.fromJson(Map<String, dynamic> json) {
|
||||
roomID = json['roomID'];
|
||||
customInfo = json['customInfo'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
data['roomID'] = roomID;
|
||||
data['customInfo'] = customInfo;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -102,9 +102,15 @@ class UserInfo {
|
||||
// }
|
||||
|
||||
UserInfo.fromJson(Map<String, dynamic> json) {
|
||||
publicInfo = json['publicInfo'] != null ? PublicUserInfo.fromJson(json['publicInfo']) : null;
|
||||
friendInfo = json['friendInfo'] != null ? FriendInfo.fromJson(json['friendInfo']) : null;
|
||||
blackInfo = json['blackInfo'] != null ? BlacklistInfo.fromJson(json['blackInfo']) : null;
|
||||
publicInfo = json['publicInfo'] != null
|
||||
? PublicUserInfo.fromJson(json['publicInfo'])
|
||||
: null;
|
||||
friendInfo = json['friendInfo'] != null
|
||||
? FriendInfo.fromJson(json['friendInfo'])
|
||||
: null;
|
||||
blackInfo = json['blackInfo'] != null
|
||||
? BlacklistInfo.fromJson(json['blackInfo'])
|
||||
: null;
|
||||
//
|
||||
isFriendship = friendInfo != null;
|
||||
isBlacklist = blackInfo != null;
|
||||
@@ -158,22 +164,32 @@ class UserInfo {
|
||||
|
||||
bool get isMale => gender == 1;
|
||||
|
||||
String get _userID => isFriendship! ? friendInfo!.userID! : (isBlacklist! ? blackInfo!.userID! : publicInfo!.userID!);
|
||||
String get _userID => isFriendship!
|
||||
? friendInfo!.userID!
|
||||
: (isBlacklist! ? blackInfo!.userID! : publicInfo!.userID!);
|
||||
|
||||
String? get _nickname =>
|
||||
isFriendship! ? friendInfo?.nickname : (isBlacklist! ? blackInfo?.nickname : publicInfo?.nickname);
|
||||
String? get _nickname => isFriendship!
|
||||
? friendInfo?.nickname
|
||||
: (isBlacklist! ? blackInfo?.nickname : publicInfo?.nickname);
|
||||
|
||||
String? get _faceUrl =>
|
||||
isFriendship! ? friendInfo?.faceURL : (isBlacklist! ? blackInfo?.faceURL : publicInfo?.faceURL);
|
||||
String? get _faceUrl => isFriendship!
|
||||
? friendInfo?.faceURL
|
||||
: (isBlacklist! ? blackInfo?.faceURL : publicInfo?.faceURL);
|
||||
|
||||
int? get _gender => isFriendship! ? friendInfo?.gender : (isBlacklist! ? blackInfo?.gender : publicInfo?.gender);
|
||||
int? get _gender => isFriendship!
|
||||
? friendInfo?.gender
|
||||
: (isBlacklist! ? blackInfo?.gender : publicInfo?.gender);
|
||||
|
||||
String? get _ex => isFriendship! ? friendInfo?.ex : (isBlacklist! ? blackInfo?.ex : publicInfo?.ex);
|
||||
String? get _ex => isFriendship!
|
||||
? friendInfo?.ex
|
||||
: (isBlacklist! ? blackInfo?.ex : publicInfo?.ex);
|
||||
|
||||
String? get _phoneNumber => friendInfo?.phoneNumber;
|
||||
|
||||
int? get _birth => friendInfo?.birth;
|
||||
|
||||
String? get _birthTime => friendInfo?.birthTime;
|
||||
|
||||
String? get _email => friendInfo?.email;
|
||||
|
||||
String? get _remark => friendInfo?.remark;
|
||||
@@ -187,7 +203,10 @@ class UserInfo {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) || other is UserInfo && runtimeType == other.runtimeType && userID == other.userID;
|
||||
identical(this, other) ||
|
||||
other is UserInfo &&
|
||||
runtimeType == other.runtimeType &&
|
||||
userID == other.userID;
|
||||
|
||||
@override
|
||||
int get hashCode => userID.hashCode;
|
||||
@@ -261,6 +280,9 @@ class FriendInfo {
|
||||
String? phoneNumber;
|
||||
|
||||
/// 出生日期
|
||||
String? birthTime;
|
||||
|
||||
/// 使用[birthTime]
|
||||
int? birth;
|
||||
|
||||
/// 邮箱
|
||||
@@ -288,6 +310,7 @@ class FriendInfo {
|
||||
this.gender,
|
||||
this.phoneNumber,
|
||||
this.birth,
|
||||
this.birthTime,
|
||||
this.email,
|
||||
this.remark,
|
||||
this.ex,
|
||||
@@ -308,6 +331,7 @@ class FriendInfo {
|
||||
gender = json['gender'];
|
||||
phoneNumber = json['phoneNumber'];
|
||||
birth = json['birth'];
|
||||
birthTime = json['birthTime'];
|
||||
email = json['email'];
|
||||
ex = json['ex'];
|
||||
}
|
||||
@@ -325,6 +349,7 @@ class FriendInfo {
|
||||
data['gender'] = this.gender;
|
||||
data['phoneNumber'] = this.phoneNumber;
|
||||
data['birth'] = this.birth;
|
||||
data['birthTime'] = this.birthTime;
|
||||
data['email'] = this.email;
|
||||
data['ex'] = this.ex;
|
||||
return data;
|
||||
@@ -534,34 +559,3 @@ class FriendApplicationInfo {
|
||||
/// 已拒绝
|
||||
bool get isRejected => handleResult == -1;
|
||||
}
|
||||
|
||||
class UserStatusInfo {
|
||||
/// 用户id
|
||||
String? userID;
|
||||
|
||||
/// 状态
|
||||
int? status;
|
||||
|
||||
/// 平台ID
|
||||
List<int>? platformIDs;
|
||||
|
||||
UserStatusInfo({
|
||||
this.userID,
|
||||
this.status,
|
||||
this.platformIDs,
|
||||
});
|
||||
|
||||
UserStatusInfo.fromJson(Map<String, dynamic> json) {
|
||||
userID = json['userID'];
|
||||
status = json['status'];
|
||||
platformIDs = json["platformIDs"] == null ? [] : List<int>.from(json["platformIDs"].map((x) => x));
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
data['userID'] = this.userID;
|
||||
data['status'] = this.status;
|
||||
data['platformIDs'] = List<dynamic>.from(platformIDs!.map((x) => x));
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
|
||||
class OpenIM {
|
||||
static const version = '3.3.0';
|
||||
static const version = '3.1.0';
|
||||
|
||||
static const _channel = const MethodChannel('flutter_openim_sdk');
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: flutter_openim_sdk
|
||||
description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source.
|
||||
version: 3.3.0
|
||||
version: 3.0.0
|
||||
homepage: https://www.rentsoft.cn
|
||||
repository: https://github.com/OpenIMSDK/Open-IM-SDK-Flutter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user