Compare commits
20 Commits
3.4.0
...
3.5.1-alph
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf4cdf0754 | ||
|
|
45cd497d94 | ||
|
|
1db776e23d | ||
|
|
98227756df | ||
|
|
da148f78e3 | ||
|
|
883627f077 | ||
|
|
50f8350987 | ||
|
|
d098a50eaa | ||
|
|
9e50ecf341 | ||
|
|
9aa861ff74 | ||
|
|
cfadcc5e35 | ||
|
|
8b4b21e18d | ||
|
|
2814122ba4 | ||
|
|
2e94254192 | ||
|
|
a9573dbc63 | ||
|
|
92dd3adad5 | ||
|
|
ebae12f11d | ||
|
|
0dec034a55 | ||
|
|
2b3f062e5c | ||
|
|
a4b52f5895 |
40
.idea/libraries/Dart_SDK.xml
generated
40
.idea/libraries/Dart_SDK.xml
generated
@@ -1,25 +1,27 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Dart SDK">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/async" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/cli" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/collection" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/convert" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/core" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/developer" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/ffi" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/html" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/indexed_db" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/io" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/isolate" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/js" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/js_util" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/math" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/mirrors" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/svg" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/typed_data" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/web_audio" />
|
||||
<root url="file://$PROJECT_DIR$/../../../framework/flutter/bin/cache/dart-sdk/lib/web_gl" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/async" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/cli" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/collection" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/convert" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/core" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/developer" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/ffi" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/html" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/indexed_db" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/io" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/isolate" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/js" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/js_interop" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/js_interop_unsafe" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/js_util" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/math" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/mirrors" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/svg" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/typed_data" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/web_audio" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/web_gl" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
||||
1
.idea/misc.xml
generated
1
.idea/misc.xml
generated
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<type id="android" />
|
||||
|
||||
16
CHANGELOG.md
16
CHANGELOG.md
@@ -1,3 +1,19 @@
|
||||
## 3.5.1-alpha.7
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.5.1-alpha.7)
|
||||
-
|
||||
## 3.5.1-alpha.2
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.5.1-alpha.2)
|
||||
|
||||
## 3.5.0-rc.1
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.5.0-rc.1)
|
||||
|
||||
## 3.4.0+1
|
||||
|
||||
- Adjust some fields and APIs.
|
||||
|
||||
## 3.4.0
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.4.0)
|
||||
|
||||
@@ -36,7 +36,6 @@ final success = await OpenIM.iMManager.initSDK(
|
||||
apiAddr: "", // SDK's API interface address.
|
||||
wsAddr: "", // SDK's WebSocket address.
|
||||
dataDir: "", // Data storage path. For example, you can use getApplicationDocumentsDirectory() to get a path.
|
||||
objectStorage: 'cos', // Image server (default is 'cos').
|
||||
logLevel: 6, // Log level (default value is 6).
|
||||
listener: OnConnectListener(
|
||||
onConnectSuccess: () {
|
||||
|
||||
@@ -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.4.0@aar'
|
||||
implementation 'io.openim:core-sdk:3.5.1-alpha.7@aar'
|
||||
}
|
||||
@@ -88,4 +88,12 @@ public class OnAdvancedMsgListener implements open_im_sdk_callback.OnAdvancedMsg
|
||||
values.put("message", s);
|
||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvOfflineNewMessage", values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvOnlineOnlyMessage(String s) {
|
||||
final Map<String, String> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("message", s);
|
||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvOnlineOnlyMessage", values);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,11 @@ public class OnConversationListener implements open_im_sdk_callback.OnConversati
|
||||
CommonUtil.emitEvent("conversationListener", "onConversationChanged", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConversationUserInputStatusChanged(String s) {
|
||||
CommonUtil.emitEvent("conversationListener", "onConversationUserInputStatusChanged", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNewConversation(String s) {
|
||||
CommonUtil.emitEvent("conversationListener", "onNewConversation", s);
|
||||
|
||||
@@ -1,30 +1,90 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
|
||||
public class OnListenerForService implements open_im_sdk_callback.OnListenerForService {
|
||||
@Override
|
||||
public void onFriendApplicationAccepted(String s) {
|
||||
CommonUtil.emitEvent("listenerForService", "onFriendApplicationAccepted", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFriendApplicationAdded(String s) {
|
||||
CommonUtil.emitEvent("listenerForService", "onFriendApplicationAdded", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGroupApplicationAccepted(String s) {
|
||||
CommonUtil.emitEvent("listenerForService", "onGroupApplicationAccepted", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGroupApplicationAdded(String s) {
|
||||
CommonUtil.emitEvent("listenerForService", "onGroupApplicationAdded", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvNewMessage(String s) {
|
||||
CommonUtil.emitEvent("listenerForService", "onRecvNewMessage", s);
|
||||
}
|
||||
}
|
||||
//package io.openim.flutter_openim_sdk.listener;
|
||||
//
|
||||
//import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
//
|
||||
//public class OnListenerForService implements open_im_sdk_callback.OnListenerForService {
|
||||
// @Override
|
||||
// public void onFriendApplicationAccepted(String s) {
|
||||
// CommonUtil.emitEvent("listenerForService", "onFriendApplicationAccepted", s);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFriendApplicationAdded(String s) {
|
||||
// CommonUtil.emitEvent("listenerForService", "onFriendApplicationAdded", s);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onGroupApplicationAccepted(String s) {
|
||||
// CommonUtil.emitEvent("listenerForService", "onGroupApplicationAccepted", s);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onGroupApplicationAdded(String s) {
|
||||
// CommonUtil.emitEvent("listenerForService", "onGroupApplicationAdded", s);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onHangUp(String s) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onInvitationCancelled(String s) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onInvitationTimeout(String s) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onInviteeAccepted(String s) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onInviteeAcceptedByOtherDevice(String s) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onInviteeRejected(String s) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onInviteeRejectedByOtherDevice(String s) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onReceiveCustomSignal(String s) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onReceiveNewInvitation(String s) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onRoomParticipantConnected(String s) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onRoomParticipantDisconnected(String s) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onStreamChange(String s) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onRecvNewMessage(String s) {
|
||||
// CommonUtil.emitEvent("listenerForService", "onRecvNewMessage", s);
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import android.util.ArrayMap;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk_callback.UploadLogProgress;
|
||||
|
||||
public class OnUploadLogsListener implements UploadLogProgress {
|
||||
final private MethodChannel.Result result;
|
||||
|
||||
public OnUploadLogsListener(MethodChannel.Result result, MethodCall call) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProgress(long current, long size) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("current", current);
|
||||
values.put("size", size);
|
||||
CommonUtil.emitEvent("uploadLogsListener", "onProgress", values);
|
||||
}
|
||||
}
|
||||
@@ -196,4 +196,21 @@ public class ConversationManager extends BaseManager {
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void searchConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.searchConversation(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "name")
|
||||
);
|
||||
}
|
||||
|
||||
public void setConversationEx(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setConversationEx(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "conversationID"),
|
||||
value(methodCall, "ex")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,8 @@ public class FriendshipManager extends BaseManager {
|
||||
Open_im_sdk.addBlack(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "userID")
|
||||
value(methodCall, "userID"),
|
||||
value(methodCall, "ex")
|
||||
);
|
||||
}
|
||||
|
||||
@@ -122,4 +123,13 @@ public class FriendshipManager extends BaseManager {
|
||||
jsonValue(methodCall, "searchParam")
|
||||
);
|
||||
}
|
||||
|
||||
public void setFriendsEx(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setFriendsEx(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "friendIDs"),
|
||||
value(methodCall, "ex")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,8 @@ public class GroupManager extends BaseManager {
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "groupID"),
|
||||
value(methodCall, "reason"),
|
||||
value(methodCall, "joinSource")
|
||||
value(methodCall, "joinSource"),
|
||||
value(methodCall, "ex")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import io.openim.flutter_openim_sdk.FlutterOpenimSdkPlugin;
|
||||
import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnConnListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnUploadFileListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnUploadLogsListener;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.Open_im_sdk;
|
||||
|
||||
@@ -62,6 +63,14 @@ public class IMManager extends BaseManager {
|
||||
);
|
||||
}
|
||||
|
||||
public void uploadLogs(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.uploadLogs(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "ex"),
|
||||
new OnUploadLogsListener(result, methodCall)
|
||||
);
|
||||
}
|
||||
|
||||
public void setAppBackgroundStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setAppBackgroundStatus(
|
||||
|
||||
@@ -69,4 +69,12 @@ public class UserManager extends BaseManager {
|
||||
jsonValue(methodCall, "userIDs"),
|
||||
value(methodCall, "groupID"));
|
||||
}
|
||||
/*
|
||||
public void setSelfInfoEx(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setSelfInfoEx(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall));
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -30,6 +30,6 @@ subprojects {
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
tasks.register("clean", Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
29
example/ios/Podfile.lock
Normal file
29
example/ios/Podfile.lock
Normal file
@@ -0,0 +1,29 @@
|
||||
PODS:
|
||||
- Flutter (1.0.0)
|
||||
- flutter_openim_sdk (0.0.1):
|
||||
- Flutter
|
||||
- OpenIMSDKCore (= 3.4.0)
|
||||
- OpenIMSDKCore (3.4.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_openim_sdk (from `.symlinks/plugins/flutter_openim_sdk/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- OpenIMSDKCore
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
flutter_openim_sdk:
|
||||
:path: ".symlinks/plugins/flutter_openim_sdk/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
flutter_openim_sdk: 54d1c836ff60ebb5b99d246521ef0cb1d834fb13
|
||||
OpenIMSDKCore: 47e0e830afe0d2dd905ad3dda255e6a6d26a555c
|
||||
|
||||
PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d
|
||||
|
||||
COCOAPODS: 1.13.0
|
||||
@@ -5,56 +5,56 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.10.0"
|
||||
version: "2.11.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
version: "1.3.0"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: clock
|
||||
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.17.0"
|
||||
version: "1.18.0"
|
||||
cupertino_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: cupertino_icons
|
||||
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.5"
|
||||
version: "1.0.6"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fake_async
|
||||
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
flutter:
|
||||
@@ -68,52 +68,44 @@ packages:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "3.4.0"
|
||||
version: "3.5.0-rc.1+1"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.6.5"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.13"
|
||||
version: "0.12.16"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.0"
|
||||
version: "0.5.0"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
version: "1.10.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.2"
|
||||
version: "1.8.3"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
@@ -123,32 +115,32 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.1"
|
||||
version: "1.10.0"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.0"
|
||||
version: "1.11.1"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.1.2"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
term_glyph:
|
||||
@@ -156,25 +148,33 @@ packages:
|
||||
description:
|
||||
name: term_glyph
|
||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.4.16"
|
||||
version: "0.6.1"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web
|
||||
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
sdks:
|
||||
dart: ">=2.18.0 <3.0.0"
|
||||
dart: ">=3.2.0-194.0.dev <4.0.0"
|
||||
flutter: ">=1.20.0"
|
||||
|
||||
38
ios/.gitignore
vendored
38
ios/.gitignore
vendored
@@ -1,38 +0,0 @@
|
||||
.idea/
|
||||
.vagrant/
|
||||
.sconsign.dblite
|
||||
.svn/
|
||||
|
||||
.DS_Store
|
||||
*.swp
|
||||
profile
|
||||
|
||||
DerivedData/
|
||||
build/
|
||||
GeneratedPluginRegistrant.h
|
||||
GeneratedPluginRegistrant.m
|
||||
|
||||
.generated/
|
||||
|
||||
*.pbxuser
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.perspectivev3
|
||||
|
||||
!default.pbxuser
|
||||
!default.mode1v3
|
||||
!default.mode2v3
|
||||
!default.perspectivev3
|
||||
|
||||
xcuserdata
|
||||
|
||||
*.moved-aside
|
||||
|
||||
*.pyc
|
||||
*sync/
|
||||
Icon?
|
||||
.tags*
|
||||
|
||||
/Flutter/Generated.xcconfig
|
||||
/Flutter/ephemeral/
|
||||
/Flutter/flutter_export_environment.sh
|
||||
@@ -27,6 +27,8 @@ public class ConversationManager: BaseServiceManager {
|
||||
self["setGlobalRecvMessageOpt"] = setGlobalRecvMessageOpt
|
||||
self["setConversationBurnDuration"] = setConversationBurnDuration
|
||||
self["hideAllConversations"] = hideAllConversations
|
||||
self["searchConversation"] = searchConversation
|
||||
self["setConversationEx"] = setConversationEx
|
||||
}
|
||||
|
||||
func setConversationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
@@ -117,6 +119,14 @@ public class ConversationManager: BaseServiceManager {
|
||||
func hideAllConversations(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkHideAllConversations(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||
}
|
||||
|
||||
func searchConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSearchConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "name"])
|
||||
}
|
||||
|
||||
func setConversationEx(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSetConversationEx(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[jsonString: "ex"])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -151,6 +161,10 @@ public class ConversationListener: NSObject, Open_im_sdk_callbackOnConversationL
|
||||
public func onTotalUnreadMessageCountChanged(_ totalUnreadCount: Int32) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onTotalUnreadMessageCountChanged", errCode: nil, errMsg: nil, data: totalUnreadCount)
|
||||
}
|
||||
|
||||
public func onConversationUserInputStatusChanged(_ change: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onConversationUserInputStatusChanged", errCode: nil, errMsg: nil, data: change)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ public class FriendshipManager: BaseServiceManager {
|
||||
self["acceptFriendApplication"] = acceptFriendApplication
|
||||
self["refuseFriendApplication"] = refuseFriendApplication
|
||||
self["searchFriends"] = searchFriends
|
||||
self["setFriendsEx"] = setFriendsEx
|
||||
}
|
||||
|
||||
func setFriendListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
@@ -52,7 +53,7 @@ public class FriendshipManager: BaseServiceManager {
|
||||
}
|
||||
|
||||
func addBlacklist(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkAddBlack(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "userID"])
|
||||
Open_im_sdkAddBlack(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "userID"], methodCall[string: "ex"])
|
||||
}
|
||||
|
||||
func getBlacklist(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
@@ -82,6 +83,10 @@ public class FriendshipManager: BaseServiceManager {
|
||||
func searchFriends(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSearchFriends(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"])
|
||||
}
|
||||
|
||||
func setFriendsEx(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSetFriendsEx(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "friendIDs"], methodCall[string: "ex"])
|
||||
}
|
||||
}
|
||||
|
||||
public class FriendshipListener: NSObject, Open_im_sdk_callbackOnFriendshipListenerProtocol {
|
||||
|
||||
@@ -78,7 +78,8 @@ public class GroupManager: BaseServiceManager {
|
||||
}
|
||||
|
||||
func joinGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkJoinGroup(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string: "reason"], methodCall[int32: "joinSource"])
|
||||
Open_im_sdkJoinGroup(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string:
|
||||
"reason"], methodCall[int32: "joinSource"], methodCall[jsonString: "ex"])
|
||||
}
|
||||
|
||||
func quitGroup(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
|
||||
@@ -13,6 +13,7 @@ public class IMMananger: BaseServiceManager {
|
||||
self["logout"] = logout
|
||||
self["getLoginStatus"] = getLoginStatus
|
||||
self["uploadFile"] = uploadFile
|
||||
self["uploadLogs"] = uploadLogs
|
||||
self["updateFcmToken"] = updateFcmToken
|
||||
self["setAppBackgroundStatus"] = setAppBackgroundStatus
|
||||
self["networkStatusChanged"] = networkStatusChanged
|
||||
@@ -83,6 +84,11 @@ public class IMMananger: BaseServiceManager {
|
||||
func uploadFile(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkUploadFile(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString(), UploadFileListener(channel: self.channel,id: methodCall[string: "id"]))
|
||||
}
|
||||
|
||||
func uploadLogs(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkUploadLogs(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "ex"], UploadLogsListener(channel: self
|
||||
.channel))
|
||||
}
|
||||
|
||||
func updateFcmToken(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkUpdateFcmToken(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "fcmToken"], methodCall[int64:
|
||||
@@ -126,11 +132,28 @@ public class ConnListener: NSObject, Open_im_sdk_callbackOnConnListenerProtocol
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class UploadLogsListener: NSObject, Open_im_sdk_callbackUploadLogProgressProtocol {
|
||||
|
||||
private let channel:FlutterMethodChannel
|
||||
|
||||
init(channel:FlutterMethodChannel) {
|
||||
self.channel = channel
|
||||
}
|
||||
|
||||
public func onProgress(_ current: Int64, size: Int64) {
|
||||
var values: [String: Any] = [:]
|
||||
values["current"] = current
|
||||
values["size"] = size
|
||||
CommonUtil.emitEvent(channel: channel, method: "uploadLogsListener", type: "onProgress", errCode: nil, errMsg: nil, data: values)
|
||||
}
|
||||
}
|
||||
|
||||
public class UploadFileListener: NSObject, Open_im_sdk_callbackUploadFileCallbackProtocol {
|
||||
|
||||
private let channel:FlutterMethodChannel
|
||||
private let id: String
|
||||
|
||||
|
||||
init(channel:FlutterMethodChannel, id: String) {
|
||||
self.channel = channel
|
||||
self.id = id
|
||||
|
||||
@@ -357,7 +357,13 @@ public class AdvancedMsgListener: NSObject, Open_im_sdk_callbackOnAdvancedMsgLis
|
||||
values["message"] = message
|
||||
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvOfflineNewMessage", errCode: nil, errMsg: nil, data: values);
|
||||
}
|
||||
|
||||
|
||||
public func onRecvOnlineOnlyMessage(_ message: String?) {
|
||||
var values: [String: Any] = [:]
|
||||
values["id"] = id
|
||||
values["message"] = message
|
||||
CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvOnlineOnlyMessage", errCode: nil, errMsg: nil, data: values);
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomBusinessListener: NSObject, Open_im_sdk_callbackOnCustomBusinessListenerProtocol {
|
||||
|
||||
@@ -14,6 +14,9 @@ public class UserManager: BaseServiceManager {
|
||||
self["getSubscribeUsersStatus"] = getSubscribeUsersStatus
|
||||
self["getUserStatus"] = getUserStatus
|
||||
self["getUsersInfoWithCache"] = getUsersInfoWithCache
|
||||
/*
|
||||
self["setSelfInfoEx"] = setSelfInfoEx
|
||||
*/
|
||||
}
|
||||
|
||||
func setUserListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
@@ -53,6 +56,11 @@ public class UserManager: BaseServiceManager {
|
||||
Open_im_sdkGetUsersInfoWithCache(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "userIDs"],
|
||||
methodCall[string: "groupID"])
|
||||
}
|
||||
/*
|
||||
func setSelfInfoEx(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSetSelfInfoEx(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
public class UserListener: NSObject, Open_im_sdk_callbackOnUserListenerProtocol {
|
||||
|
||||
@@ -17,7 +17,7 @@ A new Flutter project.
|
||||
s.dependency 'Flutter'
|
||||
s.platform = :ios, '11.0'
|
||||
|
||||
s.dependency 'OpenIMSDKCore','3.4.0'
|
||||
s.dependency 'OpenIMSDKCore','3.5.1-alpha.7'
|
||||
s.static_framework = true
|
||||
# s.vendored_frameworks = 'Framework/*.framework'
|
||||
# Flutter.framework does not contain a i386 slice.
|
||||
|
||||
BIN
lib/.DS_Store
vendored
BIN
lib/.DS_Store
vendored
Binary file not shown.
@@ -15,4 +15,5 @@ class ListenerType {
|
||||
static const messageKvInfoListener = "messageKvInfoListener";
|
||||
static const listenerForService = "listenerForService";
|
||||
static const uploadFileListener = "uploadFileListener";
|
||||
static const uploadLogsListener = "uploadLogsListener";
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ class OnAdvancedMsgListener {
|
||||
Function(String msgID, List<String> list)? onRecvMessageExtensionsDeleted;
|
||||
Function(Message msg)? onRecvNewMessage;
|
||||
Function(Message msg)? onRecvOfflineNewMessage;
|
||||
Function(Message msg)? onRecvOnlineOnlyMessage;
|
||||
|
||||
/// Uniquely identifies
|
||||
String id;
|
||||
@@ -21,6 +22,7 @@ class OnAdvancedMsgListener {
|
||||
this.onRecvMessageExtensionsDeleted,
|
||||
this.onRecvNewMessage,
|
||||
this.onRecvOfflineNewMessage,
|
||||
this.onRecvOnlineOnlyMessage,
|
||||
}) : id = "id_${DateTime.now().microsecondsSinceEpoch}";
|
||||
|
||||
void msgDeleted(Message msg) {
|
||||
@@ -56,4 +58,8 @@ class OnAdvancedMsgListener {
|
||||
void recvOfflineNewMessage(Message msg) {
|
||||
onRecvOfflineNewMessage?.call(msg);
|
||||
}
|
||||
|
||||
void recvOnlineOnlyMessage(Message msg) {
|
||||
onRecvOnlineOnlyMessage?.call(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
class OnUploadLogsListener {
|
||||
Function(int current, int size)? onUploadProgress;
|
||||
OnUploadLogsListener({this.onUploadProgress});
|
||||
|
||||
void onProgress(int current, int size) {
|
||||
onUploadProgress?.call(current, size);
|
||||
}
|
||||
}
|
||||
|
||||
class OnUploadFileListener {
|
||||
Function(String id, int size, String url, int type)? onComplete;
|
||||
Function(String id, String partHash, String fileHash)? onHashPartComplete;
|
||||
|
||||
@@ -341,6 +341,37 @@ class ConversationManager {
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// search Conversations
|
||||
Future<List<ConversationInfo>> searchConversations(
|
||||
String name, {
|
||||
String? operationID,
|
||||
}) {
|
||||
return _channel
|
||||
.invokeMethod(
|
||||
'searchConversations',
|
||||
_buildParam({
|
||||
'name': name,
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => ConversationInfo.fromJson(map)));
|
||||
}
|
||||
|
||||
Future<List<ConversationInfo>> setConversationEx(
|
||||
String conversationID, {
|
||||
String? ex,
|
||||
String? operationID,
|
||||
}) {
|
||||
return _channel
|
||||
.invokeMethod(
|
||||
'setConversationEx',
|
||||
_buildParam({
|
||||
'conversationID': conversationID,
|
||||
'ex': ex,
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => ConversationInfo.fromJson(map)));
|
||||
}
|
||||
|
||||
/// Custom Sort for Conversation List
|
||||
List<ConversationInfo> simpleSort(List<ConversationInfo> list) => list
|
||||
..sort((a, b) {
|
||||
|
||||
@@ -15,7 +15,7 @@ class FriendshipManager {
|
||||
|
||||
/// Query Friend Information
|
||||
/// [userIDList] List of user IDs
|
||||
Future<List<FriendInfo>> getFriendsInfo({
|
||||
Future<List<FullUserInfo>> getFriendsInfo({
|
||||
required List<String> userIDList,
|
||||
String? operationID,
|
||||
}) =>
|
||||
@@ -26,7 +26,7 @@ class FriendshipManager {
|
||||
"userIDList": userIDList,
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (v) => FriendInfo.fromJson(v)));
|
||||
.then((value) => Utils.toList(value, (v) => FullUserInfo.fromJson(v)));
|
||||
|
||||
/// Send a Friend Request, the other party needs to accept the request to become friends.
|
||||
/// [userID] User ID to be invited
|
||||
@@ -63,13 +63,13 @@ class FriendshipManager {
|
||||
.then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v)));
|
||||
|
||||
/// Get Friend List, including friends who have been put into the blacklist
|
||||
Future<List<FriendInfo>> getFriendList({String? operationID}) => _channel
|
||||
Future<List<FullUserInfo>> getFriendList({String? operationID}) => _channel
|
||||
.invokeMethod(
|
||||
'getFriendList',
|
||||
_buildParam({
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (v) => FriendInfo.fromJson(v)));
|
||||
.then((value) => Utils.toList(value, (v) => FullUserInfo.fromJson(v)));
|
||||
|
||||
/// Get Friend List, including friends who have been put into the blacklist (returns a map)
|
||||
Future<List<dynamic>> getFriendListMap({String? operationID}) => _channel
|
||||
@@ -100,12 +100,14 @@ class FriendshipManager {
|
||||
/// [userID] Friend's ID to be added to the blacklist
|
||||
Future<dynamic> addBlacklist({
|
||||
required String userID,
|
||||
String? ex,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'addBlacklist',
|
||||
_buildParam({
|
||||
"userID": userID,
|
||||
"ex": ex,
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
@@ -217,6 +219,20 @@ class FriendshipManager {
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => SearchFriendsInfo.fromJson(map)));
|
||||
|
||||
Future<String?> setFriendsEx(
|
||||
List<String> friendIDs, {
|
||||
String? ex,
|
||||
String? operationID,
|
||||
}) {
|
||||
return _channel.invokeMethod(
|
||||
'setFriendsEx',
|
||||
_buildParam({
|
||||
"friendIDs": friendIDs,
|
||||
"ex": ex,
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}));
|
||||
}
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "friendshipManager";
|
||||
return param;
|
||||
|
||||
@@ -207,20 +207,15 @@ class GroupManager {
|
||||
|
||||
/// Apply to join a group, requiring approval from an administrator or the group.
|
||||
/// [joinSource] 2: Invited, 3: Searched, 4: Using a QR code
|
||||
Future<dynamic> joinGroup({
|
||||
required String groupID,
|
||||
String? reason,
|
||||
String? operationID,
|
||||
int joinSource = 3,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'joinGroup',
|
||||
_buildParam({
|
||||
'groupID': groupID,
|
||||
'reason': reason,
|
||||
'joinSource': joinSource,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
Future<dynamic> joinGroup({required String groupID, String? reason, String? operationID, int joinSource = 3, String? ex}) => _channel.invokeMethod(
|
||||
'joinGroup',
|
||||
_buildParam({
|
||||
'groupID': groupID,
|
||||
'reason': reason,
|
||||
'joinSource': joinSource,
|
||||
'ex': ex,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// Exit a group
|
||||
Future<dynamic> quitGroup({
|
||||
@@ -566,8 +561,6 @@ class GroupManager {
|
||||
|
||||
/// Modify the GroupMemberInfo ex field
|
||||
Future<dynamic> setGroupMemberInfo({
|
||||
required String groupID,
|
||||
required String userID,
|
||||
required GroupMembersInfo groupMembersInfo,
|
||||
String? operationID,
|
||||
}) =>
|
||||
|
||||
@@ -16,6 +16,8 @@ class IMManager {
|
||||
late OnConnectListener _connectListener;
|
||||
OnListenerForService? _listenerForService;
|
||||
OnUploadFileListener? _uploadFileListener;
|
||||
OnUploadLogsListener? _uploadLogsListener;
|
||||
|
||||
late String userID;
|
||||
late UserInfo userInfo;
|
||||
bool isLogined = false;
|
||||
@@ -158,6 +160,11 @@ class IMManager {
|
||||
final msg = Utils.toObj(value, (map) => Message.fromJson(map));
|
||||
messageManager.msgListener.recvOfflineNewMessage(msg);
|
||||
break;
|
||||
case 'onRecvOnlineOnlyMessage':
|
||||
var value = call.arguments['data']['message'];
|
||||
final msg = Utils.toObj(value, (map) => Message.fromJson(map));
|
||||
messageManager.msgListener.recvOnlineOnlyMessage(msg);
|
||||
break;
|
||||
}
|
||||
} else if (call.method == ListenerType.msgSendProgressListener) {
|
||||
String type = call.arguments['type'];
|
||||
@@ -273,6 +280,15 @@ class IMManager {
|
||||
_listenerForService?.recvNewMessage(msg);
|
||||
break;
|
||||
}
|
||||
} else if (call.method == ListenerType.uploadLogsListener) {
|
||||
String type = call.arguments['type'];
|
||||
dynamic data = call.arguments['data'];
|
||||
switch (type) {
|
||||
case 'onProgress':
|
||||
int size = data['size'];
|
||||
int current = data['current'];
|
||||
_uploadLogsListener?.onProgress(current, size);
|
||||
}
|
||||
} else if (call.method == ListenerType.uploadFileListener) {
|
||||
String type = call.arguments['type'];
|
||||
dynamic data = call.arguments['data'];
|
||||
@@ -372,7 +388,6 @@ class IMManager {
|
||||
required String dataDir,
|
||||
required OnConnectListener listener,
|
||||
int logLevel = 6,
|
||||
String objectStorage = 'minio',
|
||||
bool isCompression = false,
|
||||
bool isLogStandardOutput = true,
|
||||
String? logFilePath,
|
||||
@@ -388,7 +403,6 @@ class IMManager {
|
||||
"wsAddr": wsAddr,
|
||||
"dataDir": dataDir,
|
||||
"logLevel": logLevel,
|
||||
"objectStorage": objectStorage,
|
||||
"isCompression": isCompression,
|
||||
"isLogStandardOutput": isLogStandardOutput,
|
||||
"logFilePath": logFilePath,
|
||||
@@ -511,6 +525,23 @@ class IMManager {
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// 上传日志
|
||||
/// [uploadlogParams] ex
|
||||
Future uploadLogs({
|
||||
String? ex,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'uploadLogs',
|
||||
_buildParam({
|
||||
'ex': ex,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
void setUploadLogsListener(OnUploadLogsListener listener) {
|
||||
_uploadLogsListener = listener;
|
||||
}
|
||||
|
||||
void setUploadFileListener(OnUploadFileListener listener) {
|
||||
_uploadFileListener = listener;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class UserManager {
|
||||
|
||||
/// Get user information
|
||||
/// [userIDList] List of user IDs
|
||||
Future<List<UserInfo>> getUsersInfo({
|
||||
Future<List<FullUserInfo>> getUsersInfo({
|
||||
required List<String> userIDList,
|
||||
String? operationID,
|
||||
}) =>
|
||||
@@ -26,7 +26,7 @@ class UserManager {
|
||||
'userIDList': userIDList,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
|
||||
.then((value) => Utils.toList(value, (v) => FullUserInfo.fromJson(v)));
|
||||
|
||||
/// Get information of the currently logged-in user
|
||||
Future<UserInfo> getSelfUserInfo({
|
||||
@@ -115,7 +115,7 @@ class UserManager {
|
||||
.then((value) => Utils.toList(value, (map) => UserStatusInfo.fromJson(map)));
|
||||
}
|
||||
|
||||
Future<List<UserInfo>> getUsersInfoWithCache(
|
||||
Future<List<FullUserInfo>> getUsersInfoWithCache(
|
||||
List<String> userIDs, {
|
||||
String? groupID,
|
||||
String? operationID,
|
||||
@@ -128,9 +128,22 @@ class UserManager {
|
||||
'groupID': groupID,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toList(value, (map) => UserInfo.fromJson(map)));
|
||||
.then((value) => Utils.toList(value, (map) => FullUserInfo.fromJson(map)));
|
||||
}
|
||||
|
||||
/*
|
||||
Future<String?> setSelfUserInfoEx(
|
||||
UserInfo userInfo, {
|
||||
String? operationID,
|
||||
}) {
|
||||
return _channel.invokeMethod(
|
||||
'setSelfUserInfoEx',
|
||||
_buildParam({
|
||||
...userInfo.toJson(),
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
}
|
||||
*/
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "userManager";
|
||||
return param;
|
||||
|
||||
@@ -25,7 +25,7 @@ class ConversationInfo {
|
||||
int? recvMsgOpt;
|
||||
|
||||
// Number of unread messages in the conversation
|
||||
int? unreadCount;
|
||||
int unreadCount = 0;
|
||||
|
||||
// Latest message in the conversation
|
||||
Message? latestMsg;
|
||||
@@ -72,7 +72,7 @@ class ConversationInfo {
|
||||
this.showName,
|
||||
this.faceURL,
|
||||
this.recvMsgOpt,
|
||||
this.unreadCount,
|
||||
this.unreadCount = 0,
|
||||
this.latestMsg,
|
||||
this.latestMsgSendTime,
|
||||
this.draftText,
|
||||
@@ -87,8 +87,7 @@ class ConversationInfo {
|
||||
this.msgDestructTime,
|
||||
});
|
||||
|
||||
ConversationInfo.fromJson(Map<String, dynamic> json)
|
||||
: conversationID = json['conversationID'] {
|
||||
ConversationInfo.fromJson(Map<String, dynamic> json) : conversationID = json['conversationID'] {
|
||||
conversationType = json['conversationType'];
|
||||
userID = json['userID'];
|
||||
groupID = json['groupID'];
|
||||
@@ -146,19 +145,14 @@ class ConversationInfo {
|
||||
bool get isSingleChat => conversationType == ConversationType.single;
|
||||
|
||||
// Check if it's a group chat
|
||||
bool get isGroupChat =>
|
||||
conversationType == ConversationType.group ||
|
||||
conversationType == ConversationType.superGroup;
|
||||
bool get isGroupChat => conversationType == ConversationType.group || conversationType == ConversationType.superGroup;
|
||||
|
||||
// Check if it's a valid conversation (not in a group if isNotInGroup is true)
|
||||
bool get isValid => isSingleChat || (isGroupChat && !isNotInGroup!);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is ConversationInfo &&
|
||||
runtimeType == other.runtimeType &&
|
||||
conversationID == other.conversationID;
|
||||
identical(this, other) || other is ConversationInfo && runtimeType == other.runtimeType && conversationID == other.conversationID;
|
||||
|
||||
@override
|
||||
int get hashCode => conversationID.hashCode;
|
||||
|
||||
@@ -3,7 +3,6 @@ class InitConfig {
|
||||
String apiAddr;
|
||||
String wsAddr;
|
||||
String dataDir;
|
||||
String objectStorage;
|
||||
int logLevel;
|
||||
bool isLogStandardOutput;
|
||||
String? logFilePath;
|
||||
@@ -13,7 +12,6 @@ class InitConfig {
|
||||
required this.apiAddr,
|
||||
required this.wsAddr,
|
||||
required this.dataDir,
|
||||
required this.objectStorage,
|
||||
this.logLevel = 6,
|
||||
this.isLogStandardOutput = true,
|
||||
this.logFilePath,
|
||||
@@ -25,7 +23,6 @@ class InitConfig {
|
||||
apiAddr: json['apiAddr'],
|
||||
wsAddr: json['wsAddr'],
|
||||
dataDir: json['dataDir'],
|
||||
objectStorage: json['objectStorage'],
|
||||
logLevel: json['logLevel'],
|
||||
isLogStandardOutput: json['isLogStandardOutput'],
|
||||
logFilePath: json['logFilePath'],
|
||||
@@ -38,7 +35,6 @@ class InitConfig {
|
||||
'apiAddr': apiAddr,
|
||||
'wsAddr': wsAddr,
|
||||
'dataDir': dataDir,
|
||||
'objectStorage': objectStorage,
|
||||
'logLevel': logLevel,
|
||||
'isLogStandardOutput': isLogStandardOutput,
|
||||
'logFilePath': logFilePath,
|
||||
|
||||
@@ -920,37 +920,27 @@ class MessageEntity {
|
||||
|
||||
/// Group message read information
|
||||
class GroupHasReadInfo {
|
||||
/// List of user IDs that have read the message
|
||||
List<String>? hasReadUserIDList;
|
||||
|
||||
/// Total number of messages read
|
||||
/// Total number of reads
|
||||
int? hasReadCount;
|
||||
|
||||
/// Number of group members when this message was sent
|
||||
int? groupMemberCount;
|
||||
int? unreadCount;
|
||||
|
||||
GroupHasReadInfo.fromJson(Map<String, dynamic> json) {
|
||||
if (json['hasReadUserIDList'] == null) {
|
||||
hasReadUserIDList = <String>[];
|
||||
} else {
|
||||
hasReadUserIDList = (json['hasReadUserIDList'] as List).cast<String>();
|
||||
}
|
||||
hasReadCount = json['hasReadCount'] ?? 0;
|
||||
groupMemberCount = json['groupMemberCount'] ?? 0;
|
||||
unreadCount = json['unreadCount'] ?? 0;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
data['hasReadUserIDList'] = this.hasReadUserIDList;
|
||||
data['hasReadCount'] = this.hasReadCount;
|
||||
data['groupMemberCount'] = this.groupMemberCount;
|
||||
data['unreadCount'] = this.unreadCount;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// Message read receipt information
|
||||
class ReadReceiptInfo {
|
||||
/// Sender's ID
|
||||
/// Sender ID
|
||||
String? userID;
|
||||
|
||||
/// Group ID
|
||||
|
||||
@@ -98,6 +98,22 @@ class FullUserInfo {
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
String get userID {
|
||||
return publicInfo?.userID ?? friendInfo?.userID ?? blackInfo?.userID ?? '';
|
||||
}
|
||||
|
||||
String get nickname {
|
||||
return publicInfo?.nickname ?? friendInfo?.nickname ?? blackInfo?.nickname ?? '';
|
||||
}
|
||||
|
||||
String get faceURL {
|
||||
return publicInfo?.faceURL ?? friendInfo?.faceURL ?? blackInfo?.faceURL ?? '';
|
||||
}
|
||||
|
||||
String get showName {
|
||||
return friendInfo?.nickname ?? nickname;
|
||||
}
|
||||
}
|
||||
|
||||
class PublicUserInfo {
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
|
||||
class OpenIM {
|
||||
static const version = '3.4.0';
|
||||
static const version = '3.5.1-alpha.7';
|
||||
|
||||
static const _channel = const MethodChannel('flutter_openim_sdk');
|
||||
|
||||
|
||||
62
pubspec.lock
62
pubspec.lock
@@ -5,10 +5,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
|
||||
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.10.0"
|
||||
version: "2.11.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -21,10 +21,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
|
||||
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
version: "1.3.0"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -37,10 +37,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
|
||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.17.0"
|
||||
version: "1.18.0"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -59,46 +59,38 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.5"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
|
||||
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.13"
|
||||
version: "0.12.16"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
|
||||
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.0"
|
||||
version: "0.5.0"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
|
||||
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
version: "1.10.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
|
||||
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.2"
|
||||
version: "1.8.3"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
@@ -108,26 +100,26 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
|
||||
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.1"
|
||||
version: "1.10.0"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.0"
|
||||
version: "1.11.1"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
||||
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.1.2"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -148,10 +140,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
|
||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.4.16"
|
||||
version: "0.6.1"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -160,6 +152,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web
|
||||
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
sdks:
|
||||
dart: ">=2.18.0 <3.0.0"
|
||||
dart: ">=3.2.0-194.0.dev <4.0.0"
|
||||
flutter: ">=1.20.0"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
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.4.0
|
||||
homepage: https://www.rentsoft.cn
|
||||
repository: https://github.com/OpenIMSDK/Open-IM-SDK-Flutter
|
||||
version: 3.5.1-alpha.7
|
||||
homepage: https://www.openim.io
|
||||
repository: https://github.com/openimsdk/open-im-sdk-flutter
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0 <3.0.0"
|
||||
sdk: ">=2.12.0 <4.0.0"
|
||||
flutter: ">=1.20.0"
|
||||
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user