juggleim-rnsdk 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build/.transforms/42b8ab7e96b9440b0e91d2ecba5f579c/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$1.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$12.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$13.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$14.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$15.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$16.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$17.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$18.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$19.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$2.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$20.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$21.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$22.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$23.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$24.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$25.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$26.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$27.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$28.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$29.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$3.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$30.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$4.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$5.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$12.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$13.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$14.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$15.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$16.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$17.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$18.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$19.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$2.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$20.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$21.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$22.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$23.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$24.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$25.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$26.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$27.class +0 -0
- package/android/build/{tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$25.class.uniqueId4 → intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$28.class} +0 -0
- package/android/build/{tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$26.class.uniqueId14 → intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$29.class} +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$3.class +0 -0
- package/android/build/{tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$27.class.uniqueId26 → intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$30.class} +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$4.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$5.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$12.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$13.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$14.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$15.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$16.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$17.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$18.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$19.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$20.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$21.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$22.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$23.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$24.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$25.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$26.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$27.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$28.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$29.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$30.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$4.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$5.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$1.class.uniqueId28 → JuggleIMManager$1.class.uniqueId31} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$12.class.uniqueId25 → JuggleIMManager$12.class.uniqueId28} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$13.class.uniqueId8 → JuggleIMManager$13.class.uniqueId9} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$14.class.uniqueId18 → JuggleIMManager$14.class.uniqueId20} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$15.class.uniqueId7 → JuggleIMManager$15.class.uniqueId8} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$16.class.uniqueId12 → JuggleIMManager$16.class.uniqueId14} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$17.class.uniqueId27 → JuggleIMManager$17.class.uniqueId30} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$18.class.uniqueId9 → JuggleIMManager$18.class.uniqueId11} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$19.class.uniqueId23 → JuggleIMManager$19.class.uniqueId26} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$2.class.uniqueId3 → JuggleIMManager$2.class.uniqueId4} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$20.class.uniqueId6 → JuggleIMManager$20.class.uniqueId7} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$21.class.uniqueId17 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$22.class.uniqueId24 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$23.class.uniqueId13 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$21.class.uniqueId15 → JuggleIMManager$24.class.uniqueId19} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$22.class.uniqueId21 → JuggleIMManager$25.class.uniqueId5} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$23.class.uniqueId11 → JuggleIMManager$26.class.uniqueId16} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$24.class.uniqueId17 → JuggleIMManager$27.class.uniqueId29} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$28.class.uniqueId10 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$29.class.uniqueId23 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$3.class.uniqueId20 → JuggleIMManager$3.class.uniqueId22} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$30.class.uniqueId1 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$4.class.uniqueId24 → JuggleIMManager$4.class.uniqueId27} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$5.class.uniqueId10 → JuggleIMManager$5.class.uniqueId12} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager.class.uniqueId2 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMPackage.class.uniqueId3 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/juggleim/JuggleIMManager.java +173 -4
- package/ios/JuggleIMManager.m +150 -4
- package/juggleim-rnsdk.podspec +1 -1
- package/package.json +1 -1
- package/src/call/ZegoSurfaceView.tsx +3 -3
- package/src/index.d.ts +33 -0
- package/src/index.js +213 -11
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/FileUtils.class.uniqueId1 +0 -0
- /package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$11.class.uniqueId16 → JuggleIMManager$11.class.uniqueId18} +0 -0
- /package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$6.class.uniqueId13 → JuggleIMManager$6.class.uniqueId15} +0 -0
- /package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$7.class.uniqueId5 → JuggleIMManager$7.class.uniqueId6} +0 -0
- /package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$8.class.uniqueId19 → JuggleIMManager$8.class.uniqueId21} +0 -0
- /package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$9.class.uniqueId22 → JuggleIMManager$9.class.uniqueId25} +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build.gradle
CHANGED
|
@@ -44,7 +44,7 @@ repositories {
|
|
|
44
44
|
|
|
45
45
|
dependencies {
|
|
46
46
|
implementation 'com.facebook.react:react-native:0.71.1'
|
|
47
|
-
implementation 'com.juggle.im:juggle:1.8.
|
|
47
|
+
implementation 'com.juggle.im:juggle:1.8.35'
|
|
48
48
|
implementation 'com.juggle.call.zego:juggle:1.8.25'
|
|
49
49
|
implementation 'im.zego:express-video:3.17.3'
|
|
50
50
|
}
|
|
@@ -25,6 +25,7 @@ import com.juggle.im.model.Conversation;
|
|
|
25
25
|
import com.juggle.im.model.ConversationInfo;
|
|
26
26
|
import com.juggle.im.model.MessageMentionInfo;
|
|
27
27
|
import com.juggle.im.model.MessageReaction;
|
|
28
|
+
import com.juggle.im.model.MediaMessageContent;
|
|
28
29
|
import com.juggle.im.model.MessageReactionItem;
|
|
29
30
|
import com.juggle.im.model.UserInfo;
|
|
30
31
|
import com.juggle.im.model.GroupMessageReadInfo;
|
|
@@ -498,7 +499,6 @@ public class JuggleIMManager extends ReactContextBaseJavaModule {
|
|
|
498
499
|
private WritableMap convertMessageContentToMap(MessageContent content) {
|
|
499
500
|
byte[] bytes = content.encode();
|
|
500
501
|
String str = new String(bytes, StandardCharsets.UTF_8);
|
|
501
|
-
Log.d("JuggleIM", "convertMessageContentToMap: " + str);
|
|
502
502
|
WritableMap map = RNTypeConverter.stringToWritableMap(str);
|
|
503
503
|
if (content instanceof ImageMessage) {
|
|
504
504
|
ImageMessage img = (ImageMessage) content;
|
|
@@ -1077,9 +1077,17 @@ public class JuggleIMManager extends ReactContextBaseJavaModule {
|
|
|
1077
1077
|
* 将 ReadableMap 转换为 Conversation 对象
|
|
1078
1078
|
*/
|
|
1079
1079
|
private Conversation convertMapToConversation(ReadableMap map) {
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1080
|
+
if (map.hasKey("conversationType") && map.hasKey("conversationId")) {
|
|
1081
|
+
Conversation.ConversationType type = Conversation.ConversationType.values()[map.getInt("conversationType")];
|
|
1082
|
+
Conversation conversation = new Conversation(type, map.getString("conversationId"));
|
|
1083
|
+
return conversation;
|
|
1084
|
+
} else if (map.hasKey("conversation")) {
|
|
1085
|
+
ReadableMap conversationMap = map.getMap("conversation");
|
|
1086
|
+
Conversation.ConversationType type = Conversation.ConversationType.values()[conversationMap.getInt("conversationType")];
|
|
1087
|
+
Conversation conversation = new Conversation(type, conversationMap.getString("conversationId"));
|
|
1088
|
+
return conversation;
|
|
1089
|
+
}
|
|
1090
|
+
return null;
|
|
1083
1091
|
}
|
|
1084
1092
|
|
|
1085
1093
|
/**
|
|
@@ -1613,6 +1621,166 @@ public class JuggleIMManager extends ReactContextBaseJavaModule {
|
|
|
1613
1621
|
}
|
|
1614
1622
|
}
|
|
1615
1623
|
|
|
1624
|
+
/**
|
|
1625
|
+
* 发送媒体消息
|
|
1626
|
+
*/
|
|
1627
|
+
@ReactMethod
|
|
1628
|
+
public void sendMediaMessage(ReadableMap messageMap, String messageId, Promise promise) {
|
|
1629
|
+
try {
|
|
1630
|
+
Conversation conversation = convertMapToConversation(messageMap);
|
|
1631
|
+
ReadableMap contentMap = messageMap.getMap("content");
|
|
1632
|
+
MessageContent content = convertMapToMessageContent(contentMap);
|
|
1633
|
+
|
|
1634
|
+
if (!(content instanceof MediaMessageContent)) {
|
|
1635
|
+
promise.reject("SEND_MEDIA_MESSAGE_ERROR", "Content is not a media message");
|
|
1636
|
+
return;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
MessageOptions options = new MessageOptions();
|
|
1640
|
+
PushData pushData = convertMapToPushData(messageMap);
|
|
1641
|
+
if (pushData != null) {
|
|
1642
|
+
options.setPushData(pushData);
|
|
1643
|
+
}
|
|
1644
|
+
ReadableMap mentionInfoMap = messageMap.getMap("mentionInfo");
|
|
1645
|
+
if (mentionInfoMap != null) {
|
|
1646
|
+
MessageMentionInfo mentionInfo = convertMapToMentionInfo(mentionInfoMap);
|
|
1647
|
+
options.setMentionInfo(mentionInfo);
|
|
1648
|
+
}
|
|
1649
|
+
if (messageMap.hasKey("referredMessageId")) {
|
|
1650
|
+
options.setReferredMessageId(messageMap.getString("referredMessageId"));
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
Message message = JIM.getInstance().getMessageManager().sendMediaMessage(
|
|
1654
|
+
(MediaMessageContent) content,
|
|
1655
|
+
conversation,
|
|
1656
|
+
options,
|
|
1657
|
+
new IMessageManager.ISendMediaMessageCallback() {
|
|
1658
|
+
@Override
|
|
1659
|
+
public void onProgress(int progress, Message message) {
|
|
1660
|
+
WritableMap params = new WritableNativeMap();
|
|
1661
|
+
params.putString("messageId", messageId);
|
|
1662
|
+
params.putInt("progress", progress);
|
|
1663
|
+
params.putMap("message", convertMessageToMap(message));
|
|
1664
|
+
sendEvent("onMediaMessageProgress", params);
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
@Override
|
|
1668
|
+
public void onSuccess(Message message) {
|
|
1669
|
+
WritableMap params = new WritableNativeMap();
|
|
1670
|
+
params.putString("messageId", messageId);
|
|
1671
|
+
params.putMap("message", convertMessageToMap(message));
|
|
1672
|
+
sendEvent("onMediaMessageSent", params);
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
@Override
|
|
1676
|
+
public void onError(Message message, int errorCode) {
|
|
1677
|
+
WritableMap params = new WritableNativeMap();
|
|
1678
|
+
params.putString("messageId", messageId);
|
|
1679
|
+
params.putMap("message", convertMessageToMap(message));
|
|
1680
|
+
params.putInt("errorCode", errorCode);
|
|
1681
|
+
sendEvent("onMediaMessageSentError", params);
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
@Override
|
|
1685
|
+
public void onCancel(Message message) {
|
|
1686
|
+
WritableMap params = new WritableNativeMap();
|
|
1687
|
+
params.putString("messageId", messageId);
|
|
1688
|
+
params.putMap("message", convertMessageToMap(message));
|
|
1689
|
+
sendEvent("onMediaMessageCancelled", params);
|
|
1690
|
+
}
|
|
1691
|
+
});
|
|
1692
|
+
|
|
1693
|
+
WritableMap result = convertMessageToMap(message);
|
|
1694
|
+
result.putString("messageId", messageId);
|
|
1695
|
+
promise.resolve(result);
|
|
1696
|
+
} catch (Exception e) {
|
|
1697
|
+
promise.reject("SEND_MEDIA_MESSAGE_ERROR", e.getMessage());
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
/**
|
|
1702
|
+
* 重发消息
|
|
1703
|
+
*/
|
|
1704
|
+
@ReactMethod
|
|
1705
|
+
public void resendMessage(ReadableMap messageMap, String messageId, Promise promise) {
|
|
1706
|
+
try {
|
|
1707
|
+
Message message = convertMapToMessage(messageMap);
|
|
1708
|
+
Message sendMsg = JIM.getInstance().getMessageManager().resendMessage(message, new IMessageManager.ISendMessageCallback() {
|
|
1709
|
+
@Override
|
|
1710
|
+
public void onSuccess(Message message) {
|
|
1711
|
+
WritableMap params = new WritableNativeMap();
|
|
1712
|
+
params.putString("messageId", messageId);
|
|
1713
|
+
params.putMap("message", convertMessageToMap(message));
|
|
1714
|
+
sendEvent("onMessageSent", params);
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
@Override
|
|
1718
|
+
public void onError(Message message, int errorCode) {
|
|
1719
|
+
WritableMap params = new WritableNativeMap();
|
|
1720
|
+
params.putString("messageId", messageId);
|
|
1721
|
+
params.putMap("message", convertMessageToMap(message));
|
|
1722
|
+
params.putInt("errorCode", errorCode);
|
|
1723
|
+
sendEvent("onMessageSentError", params);
|
|
1724
|
+
}
|
|
1725
|
+
});
|
|
1726
|
+
WritableMap result = convertMessageToMap(sendMsg);
|
|
1727
|
+
result.putString("messageId", messageId);
|
|
1728
|
+
promise.resolve(result);
|
|
1729
|
+
} catch (Exception e) {
|
|
1730
|
+
promise.reject("RESEND_MESSAGE_ERROR", e.getMessage());
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
/**
|
|
1735
|
+
* 重发媒体消息
|
|
1736
|
+
*/
|
|
1737
|
+
@ReactMethod
|
|
1738
|
+
public void resendMediaMessage(ReadableMap messageMap, String messageId, Promise promise) {
|
|
1739
|
+
try {
|
|
1740
|
+
Message message = convertMapToMessage(messageMap);
|
|
1741
|
+
Message sendMsg = JIM.getInstance().getMessageManager().resendMediaMessage(message, new IMessageManager.ISendMediaMessageCallback() {
|
|
1742
|
+
@Override
|
|
1743
|
+
public void onProgress(int progress, Message message) {
|
|
1744
|
+
WritableMap params = new WritableNativeMap();
|
|
1745
|
+
params.putString("messageId", messageId);
|
|
1746
|
+
params.putInt("progress", progress);
|
|
1747
|
+
params.putMap("message", convertMessageToMap(message));
|
|
1748
|
+
sendEvent("onMediaMessageProgress", params);
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
@Override
|
|
1752
|
+
public void onSuccess(Message message) {
|
|
1753
|
+
WritableMap params = new WritableNativeMap();
|
|
1754
|
+
params.putString("messageId", messageId);
|
|
1755
|
+
params.putMap("message", convertMessageToMap(message));
|
|
1756
|
+
sendEvent("onMediaMessageSent", params);
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
@Override
|
|
1760
|
+
public void onError(Message message, int errorCode) {
|
|
1761
|
+
WritableMap params = new WritableNativeMap();
|
|
1762
|
+
params.putString("messageId", messageId);
|
|
1763
|
+
params.putMap("message", convertMessageToMap(message));
|
|
1764
|
+
params.putInt("errorCode", errorCode);
|
|
1765
|
+
sendEvent("onMediaMessageSentError", params);
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
@Override
|
|
1769
|
+
public void onCancel(Message message) {
|
|
1770
|
+
WritableMap params = new WritableNativeMap();
|
|
1771
|
+
params.putString("messageId", messageId);
|
|
1772
|
+
params.putMap("message", convertMessageToMap(message));
|
|
1773
|
+
sendEvent("onMediaMessageCancelled", params);
|
|
1774
|
+
}
|
|
1775
|
+
});
|
|
1776
|
+
WritableMap result = convertMessageToMap(sendMsg);
|
|
1777
|
+
result.putString("messageId", messageId);
|
|
1778
|
+
promise.resolve(result);
|
|
1779
|
+
} catch (Exception e) {
|
|
1780
|
+
promise.reject("RESEND_MEDIA_MESSAGE_ERROR", e.getMessage());
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1616
1784
|
private Message convertMapToMessage(ReadableMap messageMap) {
|
|
1617
1785
|
Message message = new Message();
|
|
1618
1786
|
Conversation conversation = convertMapToConversation(messageMap);
|
|
@@ -1637,6 +1805,7 @@ public class JuggleIMManager extends ReactContextBaseJavaModule {
|
|
|
1637
1805
|
ReadableMap contentMap = messageMap.getMap("content");
|
|
1638
1806
|
MessageContent content = convertMapToMessageContent(contentMap);
|
|
1639
1807
|
message.setContent(content);
|
|
1808
|
+
message.setContentType(content.getContentType());
|
|
1640
1809
|
}
|
|
1641
1810
|
|
|
1642
1811
|
// 设置消息方向
|
package/ios/JuggleIMManager.m
CHANGED
|
@@ -394,6 +394,7 @@ RCT_EXPORT_METHOD(addConversationDelegate) {
|
|
|
394
394
|
dict[@"content"] = contentDic;
|
|
395
395
|
dict[@"direction"] = @(message.direction);
|
|
396
396
|
dict[@"messageState"] = @(message.messageState);
|
|
397
|
+
dict[@"contentType"] = message.contentType;
|
|
397
398
|
|
|
398
399
|
// 添加是否已读
|
|
399
400
|
dict[@"hasRead"] = @(message.hasRead);
|
|
@@ -1001,11 +1002,20 @@ RCT_EXPORT_METHOD(removeConversationsFromTag : (NSArray *)
|
|
|
1001
1002
|
* 将字典转换为会话对象
|
|
1002
1003
|
*/
|
|
1003
1004
|
- (JConversation *)convertDictionaryToConversation:(NSDictionary *)dict {
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1005
|
+
if (dict[@"conversation"]) {
|
|
1006
|
+
NSDictionary* conversationDict = dict[@"conversation"];
|
|
1007
|
+
JConversationType type =
|
|
1008
|
+
(JConversationType)[conversationDict[@"conversationType"] intValue];
|
|
1009
|
+
NSString *conversationId = conversationDict[@"conversationId"];
|
|
1010
|
+
return [[JConversation alloc] initWithConversationType:type
|
|
1008
1011
|
conversationId:conversationId];
|
|
1012
|
+
} else {
|
|
1013
|
+
JConversationType type =
|
|
1014
|
+
(JConversationType)[dict[@"conversationType"] intValue];
|
|
1015
|
+
NSString *conversationId = dict[@"conversationId"];
|
|
1016
|
+
return [[JConversation alloc] initWithConversationType:type
|
|
1017
|
+
conversationId:conversationId];
|
|
1018
|
+
}
|
|
1009
1019
|
}
|
|
1010
1020
|
|
|
1011
1021
|
/**
|
|
@@ -1479,6 +1489,141 @@ RCT_EXPORT_METHOD(removeMessageReaction : (
|
|
|
1479
1489
|
return nil;
|
|
1480
1490
|
}
|
|
1481
1491
|
|
|
1492
|
+
/**
|
|
1493
|
+
* 重发消息
|
|
1494
|
+
*/
|
|
1495
|
+
RCT_EXPORT_METHOD(resendMessage : (NSDictionary *)messageDict messageId : (
|
|
1496
|
+
NSString *)messageId resolver : (RCTPromiseResolveBlock)
|
|
1497
|
+
resolve rejecter : (RCTPromiseRejectBlock)reject) {
|
|
1498
|
+
@try {
|
|
1499
|
+
JMessage *message = [self convertDictToMessage:messageDict];
|
|
1500
|
+
JMessage *sendMsg = [JIM.shared.messageManager resend:message
|
|
1501
|
+
success:^(JMessage *message) {
|
|
1502
|
+
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
1503
|
+
params[@"messageId"] = messageId;
|
|
1504
|
+
params[@"message"] = [self convertMessageToDictionary:message];
|
|
1505
|
+
[self sendEventWithName:@"onMessageSent" body:params];
|
|
1506
|
+
}
|
|
1507
|
+
error:^(JErrorCode errorCode, JMessage *message) {
|
|
1508
|
+
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
1509
|
+
params[@"messageId"] = messageId;
|
|
1510
|
+
params[@"message"] = [self convertMessageToDictionary:message];
|
|
1511
|
+
params[@"errorCode"] = @(errorCode);
|
|
1512
|
+
[self sendEventWithName:@"onMessageSentError" body:params];
|
|
1513
|
+
}];
|
|
1514
|
+
NSMutableDictionary *result = [self convertMessageToDictionary:sendMsg];
|
|
1515
|
+
result[@"messageId"] = messageId;
|
|
1516
|
+
resolve(result);
|
|
1517
|
+
} @catch (NSException *exception) {
|
|
1518
|
+
reject(@"RESEND_MESSAGE_ERROR", exception.reason, nil);
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
/**
|
|
1523
|
+
* 重发媒体消息
|
|
1524
|
+
*/
|
|
1525
|
+
RCT_EXPORT_METHOD(resendMediaMessage : (NSDictionary *)messageDict messageId : (
|
|
1526
|
+
NSString *)messageId resolver : (RCTPromiseResolveBlock)
|
|
1527
|
+
resolve rejecter : (RCTPromiseRejectBlock)reject) {
|
|
1528
|
+
@try {
|
|
1529
|
+
JMessage *message = [self convertDictToMessage:messageDict];
|
|
1530
|
+
JMessage *sendMsg = [JIM.shared.messageManager resendMediaMessage:message
|
|
1531
|
+
progress:^(int progress, JMessage *message) {
|
|
1532
|
+
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
1533
|
+
params[@"messageId"] = messageId;
|
|
1534
|
+
params[@"progress"] = @(progress);
|
|
1535
|
+
params[@"message"] = [self convertMessageToDictionary:message];
|
|
1536
|
+
[self sendEventWithName:@"onMediaMessageProgress" body:params];
|
|
1537
|
+
}
|
|
1538
|
+
success:^(JMessage *message) {
|
|
1539
|
+
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
1540
|
+
params[@"messageId"] = messageId;
|
|
1541
|
+
params[@"message"] = [self convertMessageToDictionary:message];
|
|
1542
|
+
[self sendEventWithName:@"onMediaMessageSent" body:params];
|
|
1543
|
+
}
|
|
1544
|
+
error:^(JErrorCode errorCode, JMessage *message) {
|
|
1545
|
+
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
1546
|
+
params[@"messageId"] = messageId;
|
|
1547
|
+
params[@"message"] = [self convertMessageToDictionary:message];
|
|
1548
|
+
params[@"errorCode"] = @(errorCode);
|
|
1549
|
+
[self sendEventWithName:@"onMediaMessageSentError" body:params];
|
|
1550
|
+
}
|
|
1551
|
+
cancel:^(JMessage *message) {
|
|
1552
|
+
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
1553
|
+
params[@"messageId"] = messageId;
|
|
1554
|
+
params[@"message"] = [self convertMessageToDictionary:message];
|
|
1555
|
+
[self sendEventWithName:@"onMediaMessageCancelled" body:params];
|
|
1556
|
+
}];
|
|
1557
|
+
NSMutableDictionary *result = [self convertMessageToDictionary:sendMsg];
|
|
1558
|
+
result[@"messageId"] = messageId;
|
|
1559
|
+
resolve(result);
|
|
1560
|
+
} @catch (NSException *exception) {
|
|
1561
|
+
reject(@"RESEND_MEDIA_MESSAGE_ERROR", exception.reason, nil);
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* 发送媒体消息
|
|
1567
|
+
*/
|
|
1568
|
+
RCT_EXPORT_METHOD(sendMediaMessage : (NSDictionary *)messageDict resolver : (
|
|
1569
|
+
RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject) {
|
|
1570
|
+
@try {
|
|
1571
|
+
NSString *messageId = [NSString stringWithFormat:@"%f%d", [[NSDate date] timeIntervalSince1970], arc4random() % 10000];
|
|
1572
|
+
if (messageDict[@"messageId"]) {
|
|
1573
|
+
messageId = messageDict[@"messageId"];
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
JMessageContent *content = [self convertDictToMessageContent:messageDict[@"content"]];
|
|
1577
|
+
if (!content) {
|
|
1578
|
+
reject(@"SEND_MEDIA_MESSAGE_ERROR", @"Invalid message content", nil);
|
|
1579
|
+
return;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
if (![content isKindOfClass:[JMediaMessageContent class]]) {
|
|
1583
|
+
reject(@"SEND_MEDIA_MESSAGE_ERROR", @"Content must be MediaMessageContent", nil);
|
|
1584
|
+
return;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
JConversation *conversation =
|
|
1588
|
+
[self convertDictionaryToConversation:messageDict];
|
|
1589
|
+
|
|
1590
|
+
JMessage *message = [JIM.shared.messageManager sendMediaMessage:(JMediaMessageContent *)content
|
|
1591
|
+
inConversation:conversation
|
|
1592
|
+
progress:^(int progress, JMessage *message) {
|
|
1593
|
+
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
1594
|
+
params[@"messageId"] = messageId;
|
|
1595
|
+
params[@"progress"] = @(progress);
|
|
1596
|
+
params[@"message"] = [self convertMessageToDictionary:message];
|
|
1597
|
+
[self sendEventWithName:@"onMediaMessageProgress" body:params];
|
|
1598
|
+
}
|
|
1599
|
+
success:^(JMessage *message) {
|
|
1600
|
+
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
1601
|
+
params[@"messageId"] = messageId;
|
|
1602
|
+
params[@"message"] = [self convertMessageToDictionary:message];
|
|
1603
|
+
[self sendEventWithName:@"onMediaMessageSent" body:params];
|
|
1604
|
+
}
|
|
1605
|
+
error:^(JErrorCode errorCode, JMessage *message) {
|
|
1606
|
+
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
1607
|
+
params[@"messageId"] = messageId;
|
|
1608
|
+
params[@"message"] = [self convertMessageToDictionary:message];
|
|
1609
|
+
params[@"errorCode"] = @(errorCode);
|
|
1610
|
+
[self sendEventWithName:@"onMediaMessageSentError" body:params];
|
|
1611
|
+
}
|
|
1612
|
+
cancel:^(JMessage *message) {
|
|
1613
|
+
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
1614
|
+
params[@"messageId"] = messageId;
|
|
1615
|
+
params[@"message"] = [self convertMessageToDictionary:message];
|
|
1616
|
+
[self sendEventWithName:@"onMediaMessageCancelled" body:params];
|
|
1617
|
+
}];
|
|
1618
|
+
|
|
1619
|
+
NSMutableDictionary *result = [self convertMessageToDictionary:message];
|
|
1620
|
+
result[@"messageId"] = messageId;
|
|
1621
|
+
resolve(result);
|
|
1622
|
+
} @catch (NSException *exception) {
|
|
1623
|
+
reject(@"SEND_MEDIA_MESSAGE_ERROR", exception.reason, nil);
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1482
1627
|
- (JMessage *)convertDictToMessage:(NSDictionary *)messageDict {
|
|
1483
1628
|
if (![messageDict isKindOfClass:[NSDictionary class]]) {
|
|
1484
1629
|
return nil;
|
|
@@ -1516,6 +1661,7 @@ RCT_EXPORT_METHOD(removeMessageReaction : (
|
|
|
1516
1661
|
if ([contentDict isKindOfClass:[NSDictionary class]]) {
|
|
1517
1662
|
JMessageContent *content = [self convertDictToMessageContent:contentDict];
|
|
1518
1663
|
message.content = content;
|
|
1664
|
+
message.contentType = contentDict[@"contentType"];
|
|
1519
1665
|
}
|
|
1520
1666
|
|
|
1521
1667
|
// 7. direction
|
package/juggleim-rnsdk.podspec
CHANGED
package/package.json
CHANGED
|
@@ -19,6 +19,6 @@ const ZegoSurfaceViewManager = Platform.select<React.ComponentType<SurfaceViewPr
|
|
|
19
19
|
})!;
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
export const ZegoSurfaceView
|
|
23
|
-
return <ZegoSurfaceViewManager {...props} />;
|
|
24
|
-
};
|
|
22
|
+
export const ZegoSurfaceView = React.forwardRef<React.ComponentRef<typeof ZegoSurfaceViewManager>, SurfaceViewProps>((props, ref) => {
|
|
23
|
+
return <ZegoSurfaceViewManager {...props} ref={ref} />;
|
|
24
|
+
});
|
package/src/index.d.ts
CHANGED
|
@@ -519,6 +519,39 @@ export default class JuggleIM {
|
|
|
519
519
|
* @returns {Promise<GroupInfo[]>} 群组信息列表
|
|
520
520
|
*/
|
|
521
521
|
static getGroupInfoList(groupIdList: string[]): Promise<GroupInfo[]>;
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* 重发消息
|
|
525
|
+
* @param {Message} message - 消息对象
|
|
526
|
+
* @param {SendMessageCallback} [callback] - 回调对象
|
|
527
|
+
* @returns {Promise<Message>} - 消息对象
|
|
528
|
+
*/
|
|
529
|
+
static resendMessage(
|
|
530
|
+
message: Message,
|
|
531
|
+
callback?: SendMessageCallback
|
|
532
|
+
): Promise<Message>;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* 重发媒体消息
|
|
536
|
+
* @param {Message} message - 消息对象
|
|
537
|
+
* @param {SendMediaMessageCallback} [callback] - 回调对象
|
|
538
|
+
* @returns {Promise<Message>} - 消息对象
|
|
539
|
+
*/
|
|
540
|
+
static resendMediaMessage(
|
|
541
|
+
message: Message,
|
|
542
|
+
callback?: SendMediaMessageCallback
|
|
543
|
+
): Promise<Message>;
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* 发送媒体消息
|
|
547
|
+
* @param {SendMessageObject} message - 消息内容
|
|
548
|
+
* @param {SendMediaMessageCallback} [callback] - 回调对象
|
|
549
|
+
* @returns {Promise<Message>} - 消息对象
|
|
550
|
+
*/
|
|
551
|
+
static sendMediaMessage(
|
|
552
|
+
message: SendMessageObject,
|
|
553
|
+
callback?: SendMediaMessageCallback
|
|
554
|
+
): Promise<Message>;
|
|
522
555
|
}
|
|
523
556
|
|
|
524
557
|
|
package/src/index.js
CHANGED
|
@@ -763,9 +763,10 @@ class JuggleIM {
|
|
|
763
763
|
|
|
764
764
|
const successListener = juggleIMEmitter.addListener(
|
|
765
765
|
"onMessageSent",
|
|
766
|
-
(event) => {
|
|
766
|
+
async (event) => {
|
|
767
767
|
if (event.messageId === messageId) {
|
|
768
|
-
|
|
768
|
+
const msgInfo = await this.buildMessageInfo(event.message);
|
|
769
|
+
callback.onSuccess?.(msgInfo);
|
|
769
770
|
successListener.remove();
|
|
770
771
|
errorListener.remove();
|
|
771
772
|
}
|
|
@@ -785,7 +786,7 @@ class JuggleIM {
|
|
|
785
786
|
|
|
786
787
|
try {
|
|
787
788
|
const localMsg = await JMI.sendMessage(message, messageId);
|
|
788
|
-
return localMsg
|
|
789
|
+
return this.buildMessageInfo(localMsg)
|
|
789
790
|
} catch (error) {
|
|
790
791
|
callback.onError?.(JSON.stringify(error), -1);
|
|
791
792
|
successListener.remove();
|
|
@@ -821,10 +822,11 @@ class JuggleIM {
|
|
|
821
822
|
|
|
822
823
|
const successListener = juggleIMEmitter.addListener(
|
|
823
824
|
"onMediaMessageSent",
|
|
824
|
-
(event) => {
|
|
825
|
+
async (event) => {
|
|
825
826
|
console.log("onMediaMessageSent msg:", event);
|
|
826
827
|
if (event.messageId === messageId) {
|
|
827
|
-
|
|
828
|
+
const msgInfo = await this.buildMessageInfo(event.message);
|
|
829
|
+
callback.onSuccess?.(msgInfo);
|
|
828
830
|
progressListener.remove();
|
|
829
831
|
successListener.remove();
|
|
830
832
|
errorListener.remove();
|
|
@@ -865,7 +867,7 @@ class JuggleIM {
|
|
|
865
867
|
if (localMsg.content?.local) {
|
|
866
868
|
localMsg.content.localPath = localMsg.content.local;
|
|
867
869
|
}
|
|
868
|
-
return localMsg
|
|
870
|
+
return this.buildMessageInfo(localMsg)
|
|
869
871
|
} catch (error) {
|
|
870
872
|
progressListener.remove();
|
|
871
873
|
successListener.remove();
|
|
@@ -940,8 +942,7 @@ class JuggleIM {
|
|
|
940
942
|
try {
|
|
941
943
|
console.log("sendFileMessage message...:", message);
|
|
942
944
|
const localMsg = await JMI.sendFileMessage(message, messageId);
|
|
943
|
-
|
|
944
|
-
return localMsg;
|
|
945
|
+
return this.buildMessageInfo(localMsg)
|
|
945
946
|
} catch (error) {
|
|
946
947
|
progressListener.remove();
|
|
947
948
|
successListener.remove();
|
|
@@ -976,10 +977,11 @@ class JuggleIM {
|
|
|
976
977
|
|
|
977
978
|
const successListener = juggleIMEmitter.addListener(
|
|
978
979
|
"onMediaMessageSent",
|
|
979
|
-
(event) => {
|
|
980
|
+
async (event) => {
|
|
980
981
|
if (event.messageId === messageId) {
|
|
981
982
|
console.log("onMediaMessageSent msg:", event);
|
|
982
|
-
|
|
983
|
+
const msgInfo = await this.buildMessageInfo(event.message);
|
|
984
|
+
callback.onSuccess?.(msgInfo);
|
|
983
985
|
progressListener.remove();
|
|
984
986
|
successListener.remove();
|
|
985
987
|
errorListener.remove();
|
|
@@ -1016,7 +1018,7 @@ class JuggleIM {
|
|
|
1016
1018
|
|
|
1017
1019
|
try {
|
|
1018
1020
|
const localMsg = await JMI.sendVoiceMessage(message, messageId);
|
|
1019
|
-
return localMsg
|
|
1021
|
+
return this.buildMessageInfo(localMsg)
|
|
1020
1022
|
} catch (error) {
|
|
1021
1023
|
progressListener.remove();
|
|
1022
1024
|
successListener.remove();
|
|
@@ -1193,6 +1195,206 @@ class JuggleIM {
|
|
|
1193
1195
|
static getGroupInfoList(groupIdList) {
|
|
1194
1196
|
return JMI.getGroupInfoList(groupIdList);
|
|
1195
1197
|
}
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* 重发消息
|
|
1201
|
+
* @param {import("juggleim-rnsdk").Message} message
|
|
1202
|
+
* @param {import("juggleim-rnsdk").SendMessageCallback} callback - 回调对象
|
|
1203
|
+
* @returns {import("juggleim-rnsdk").Message} - 消息对象
|
|
1204
|
+
*/
|
|
1205
|
+
static async resendMessage(
|
|
1206
|
+
message,
|
|
1207
|
+
callback = {}
|
|
1208
|
+
) {
|
|
1209
|
+
console.log("resendMessage message:", message);
|
|
1210
|
+
|
|
1211
|
+
// 生成唯一标识符以避免回调冲突
|
|
1212
|
+
const messageId = Math.random().toString(36).substr(2, 9) + Date.now();
|
|
1213
|
+
|
|
1214
|
+
const successListener = juggleIMEmitter.addListener(
|
|
1215
|
+
"onMessageSent",
|
|
1216
|
+
async (event) => {
|
|
1217
|
+
if (event.messageId === messageId) {
|
|
1218
|
+
const msgInfo = await this.buildMessageInfo(event.message);
|
|
1219
|
+
callback.onSuccess?.(msgInfo);
|
|
1220
|
+
successListener.remove();
|
|
1221
|
+
errorListener.remove();
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
);
|
|
1225
|
+
|
|
1226
|
+
const errorListener = juggleIMEmitter.addListener(
|
|
1227
|
+
"onMessageSentError",
|
|
1228
|
+
async (event) => {
|
|
1229
|
+
if (event.messageId === messageId) {
|
|
1230
|
+
callback.onError?.(event.message, event.errorCode || -1);
|
|
1231
|
+
successListener.remove();
|
|
1232
|
+
errorListener.remove();
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
);
|
|
1236
|
+
|
|
1237
|
+
try {
|
|
1238
|
+
const localMsg = await JMI.resendMessage(message, messageId);
|
|
1239
|
+
const msgInfo = await this.buildMessageInfo(localMsg);
|
|
1240
|
+
console.log("resendMessage msgInfo:", msgInfo);
|
|
1241
|
+
return msgInfo;
|
|
1242
|
+
} catch (error) {
|
|
1243
|
+
callback.onError?.(JSON.stringify(error), -1);
|
|
1244
|
+
successListener.remove();
|
|
1245
|
+
errorListener.remove();
|
|
1246
|
+
console.error("resendMessage error:", error);
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
/**
|
|
1251
|
+
* 重发媒体消息
|
|
1252
|
+
* @param {import("juggleim-rnsdk").Message} message
|
|
1253
|
+
* @param {import("juggleim-rnsdk").SendMediaMessageCallback} callback - 回调对象
|
|
1254
|
+
* @returns {import("juggleim-rnsdk").Message} - 消息对象
|
|
1255
|
+
*/
|
|
1256
|
+
static async resendMediaMessage(
|
|
1257
|
+
message,
|
|
1258
|
+
callback = {}
|
|
1259
|
+
) {
|
|
1260
|
+
console.log("resendMediaMessage message:", message);
|
|
1261
|
+
|
|
1262
|
+
const messageId = Math.random().toString(36).substr(2, 9) + Date.now();
|
|
1263
|
+
|
|
1264
|
+
const progressListener = juggleIMEmitter.addListener(
|
|
1265
|
+
"onMediaMessageProgress",
|
|
1266
|
+
(event) => {
|
|
1267
|
+
if (event.messageId === messageId) {
|
|
1268
|
+
callback.onProgress?.(event.progress, event.message);
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
);
|
|
1272
|
+
|
|
1273
|
+
const successListener = juggleIMEmitter.addListener(
|
|
1274
|
+
"onMediaMessageSent",
|
|
1275
|
+
async (event) => {
|
|
1276
|
+
if (event.messageId === messageId) {
|
|
1277
|
+
const msgInfo = await this.buildMessageInfo(event.message);
|
|
1278
|
+
callback.onSuccess?.(msgInfo);
|
|
1279
|
+
progressListener.remove();
|
|
1280
|
+
successListener.remove();
|
|
1281
|
+
errorListener.remove();
|
|
1282
|
+
cancelListener.remove();
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
);
|
|
1286
|
+
|
|
1287
|
+
const errorListener = juggleIMEmitter.addListener(
|
|
1288
|
+
"onMediaMessageSentError",
|
|
1289
|
+
(event) => {
|
|
1290
|
+
if (event.messageId === messageId) {
|
|
1291
|
+
callback.onError?.(event.message, event.errorCode || -1);
|
|
1292
|
+
progressListener.remove();
|
|
1293
|
+
successListener.remove();
|
|
1294
|
+
errorListener.remove();
|
|
1295
|
+
cancelListener.remove();
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
);
|
|
1299
|
+
|
|
1300
|
+
const cancelListener = juggleIMEmitter.addListener(
|
|
1301
|
+
"onMediaMessageCancelled",
|
|
1302
|
+
(event) => {
|
|
1303
|
+
if (event.messageId === messageId) {
|
|
1304
|
+
callback.onCancel?.(event.message);
|
|
1305
|
+
progressListener.remove();
|
|
1306
|
+
successListener.remove();
|
|
1307
|
+
errorListener.remove();
|
|
1308
|
+
cancelListener.remove();
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
);
|
|
1312
|
+
|
|
1313
|
+
try {
|
|
1314
|
+
return await JMI.resendMediaMessage(message, messageId);
|
|
1315
|
+
} catch (error) {
|
|
1316
|
+
callback.onError?.(JSON.stringify(error), -1);
|
|
1317
|
+
progressListener.remove();
|
|
1318
|
+
successListener.remove();
|
|
1319
|
+
errorListener.remove();
|
|
1320
|
+
cancelListener.remove();
|
|
1321
|
+
console.error("resendMediaMessage error:", error);
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* 发送媒体消息
|
|
1327
|
+
* @param {import("juggleim-rnsdk").SendMessageObject} message - 消息内容
|
|
1328
|
+
* @param {import("juggleim-rnsdk").SendMediaMessageCallback} callback - 回调对象
|
|
1329
|
+
* @returns {Promise<import("juggleim-rnsdk").Message>} - 消息对象
|
|
1330
|
+
*/
|
|
1331
|
+
static async sendMediaMessage(message, callback = {}) {
|
|
1332
|
+
const messageId = Math.random().toString(36).substr(2, 9) + Date.now();
|
|
1333
|
+
const progressListener = juggleIMEmitter.addListener(
|
|
1334
|
+
"onMediaMessageProgress",
|
|
1335
|
+
(event) => {
|
|
1336
|
+
if (event.messageId === messageId) {
|
|
1337
|
+
callback.onProgress?.(event.progress, event.message);
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
);
|
|
1341
|
+
const successListener = juggleIMEmitter.addListener(
|
|
1342
|
+
"onMediaMessageSent",
|
|
1343
|
+
(event) => {
|
|
1344
|
+
if (event.messageId === messageId) {
|
|
1345
|
+
const msgInfo = this.buildMessageInfo(event.message);
|
|
1346
|
+
callback.onSuccess?.(msgInfo);
|
|
1347
|
+
progressListener.remove();
|
|
1348
|
+
successListener.remove();
|
|
1349
|
+
errorListener.remove();
|
|
1350
|
+
cancelListener.remove();
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
);
|
|
1354
|
+
const errorListener = juggleIMEmitter.addListener(
|
|
1355
|
+
"onMediaMessageSentError",
|
|
1356
|
+
(event) => {
|
|
1357
|
+
if (event.messageId === messageId) {
|
|
1358
|
+
callback.onError?.(event.message, event.errorCode || -1);
|
|
1359
|
+
progressListener.remove();
|
|
1360
|
+
successListener.remove();
|
|
1361
|
+
errorListener.remove();
|
|
1362
|
+
cancelListener.remove();
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
);
|
|
1366
|
+
const cancelListener = juggleIMEmitter.addListener(
|
|
1367
|
+
"onMediaMessageCancelled",
|
|
1368
|
+
(event) => {
|
|
1369
|
+
if (event.messageId === messageId) {
|
|
1370
|
+
callback.onCancel?.(event.message);
|
|
1371
|
+
progressListener.remove();
|
|
1372
|
+
successListener.remove();
|
|
1373
|
+
errorListener.remove();
|
|
1374
|
+
cancelListener.remove();
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
);
|
|
1378
|
+
|
|
1379
|
+
try {
|
|
1380
|
+
var msg = null;
|
|
1381
|
+
if (Platform.OS === "android") {
|
|
1382
|
+
msg = await JMI.sendMediaMessage(message, messageId);
|
|
1383
|
+
} else {
|
|
1384
|
+
const messageWithId = { ...message, messageId };
|
|
1385
|
+
msg = await JMI.sendMediaMessage(messageWithId);
|
|
1386
|
+
}
|
|
1387
|
+
const msgInfo = await this.buildMessageInfo(msg);
|
|
1388
|
+
return msgInfo;
|
|
1389
|
+
} catch (error) {
|
|
1390
|
+
callback.onError?.(JSON.stringify(error), -1);
|
|
1391
|
+
progressListener.remove();
|
|
1392
|
+
successListener.remove();
|
|
1393
|
+
errorListener.remove();
|
|
1394
|
+
cancelListener.remove();
|
|
1395
|
+
console.error("sendMediaMessage error:", error);
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1196
1398
|
}
|
|
1197
1399
|
|
|
1198
1400
|
export * from './types';
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|