juggleim-rnsdk 1.0.0 → 1.0.2
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/b0801d69fde866e333b2668f7818fd8c/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$10.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$11.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$12.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$13.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$14.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$15.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$16.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$17.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$18.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$19.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$20.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$21.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$22.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$23.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$24.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$25.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$26.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$27.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$28.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$29.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$30.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$31.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$32.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$7.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$8.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$9.dex +0 -0
- package/android/build/.transforms/b4ca33bd6785fb4810b9572ca7ad5980/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager.dex +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$10.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$11.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$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/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$28.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$29.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$30.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$31.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$32.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$7.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$8.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$9.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$10.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$11.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$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$30.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$31.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$32.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$7.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$8.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$9.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.uniqueId29 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$10.class.uniqueId21 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$11.class.uniqueId5 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$12.class.uniqueId15 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$13.class.uniqueId12 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$14.class.uniqueId24 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$15.class.uniqueId26 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$16.class.uniqueId10 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$17.class.uniqueId33 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$18.class.uniqueId0 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$19.class.uniqueId23 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$2.class.uniqueId8 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$20.class.uniqueId20 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$21.class.uniqueId3 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$22.class.uniqueId32 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$23.class.uniqueId11 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$24.class.uniqueId27 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$25.class.uniqueId25 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$26.class.uniqueId13 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$27.class.uniqueId14 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$28.class.uniqueId4 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$29.class.uniqueId19 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$3.class.uniqueId16 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$30.class.uniqueId22 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$31.class.uniqueId2 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$32.class.uniqueId31 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$4.class.uniqueId30 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$5.class.uniqueId9 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$6.class.uniqueId28 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$7.class.uniqueId7 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$8.class.uniqueId17 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$9.class.uniqueId1 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager.class.uniqueId18 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/src/main/java/com/juggleim/JuggleIMManager.java +78 -0
- package/ios/JModelFactory.m +2 -2
- package/ios/JRNCustomMessageContent.h +32 -0
- package/ios/JRNCustomMessageContent.m +69 -0
- package/ios/JuggleIMManager.m +35 -0
- package/package.json +1 -1
- package/src/types.d.ts +25 -0
- package/src/types.js +15 -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
|
|
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
|
|
@@ -585,6 +585,17 @@ public class JuggleIMManager extends ReactContextBaseJavaModule {
|
|
|
585
585
|
map.putString("localPath", img.getLocalPath());
|
|
586
586
|
map.putString("thumbnailLocalPath", img.getThumbnailLocalPath());
|
|
587
587
|
map.putString("thumbnailUrl", img.getThumbnailUrl());
|
|
588
|
+
} else if (content instanceof VideoMessage) {
|
|
589
|
+
VideoMessage video = (VideoMessage) content;
|
|
590
|
+
map.putString("localPath", video.getLocalPath());
|
|
591
|
+
map.putString("url", video.getUrl());
|
|
592
|
+
map.putString("snapshotLocalPath", video.getSnapshotLocalPath());
|
|
593
|
+
map.putString("snapshotUrl", video.getSnapshotUrl());
|
|
594
|
+
map.putInt("width", video.getWidth());
|
|
595
|
+
map.putInt("height", video.getHeight());
|
|
596
|
+
map.putDouble("size", video.getSize());
|
|
597
|
+
map.putInt("duration", video.getDuration());
|
|
598
|
+
map.putString("extra", video.getExtra());
|
|
588
599
|
} else if (content instanceof StreamTextMessage) {
|
|
589
600
|
StreamTextMessage streamText = (StreamTextMessage) content;
|
|
590
601
|
map.putBoolean("isFinished", streamText.isFinished());
|
|
@@ -592,6 +603,49 @@ public class JuggleIMManager extends ReactContextBaseJavaModule {
|
|
|
592
603
|
return map;
|
|
593
604
|
}
|
|
594
605
|
|
|
606
|
+
/**
|
|
607
|
+
* 读取字符串字段,不存在或为空时返回空字符串。
|
|
608
|
+
*
|
|
609
|
+
* @param map 原始消息内容
|
|
610
|
+
* @param key 字段名
|
|
611
|
+
* @return 字符串字段值
|
|
612
|
+
*/
|
|
613
|
+
private String getOptionalString(ReadableMap map, String key) {
|
|
614
|
+
if (map.hasKey(key) && !map.isNull(key)) {
|
|
615
|
+
return map.getString(key);
|
|
616
|
+
}
|
|
617
|
+
return "";
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* 读取整数字段,不存在或为空时返回 0。
|
|
622
|
+
*
|
|
623
|
+
* @param map 原始消息内容
|
|
624
|
+
* @param key 字段名
|
|
625
|
+
* @return 整数字段值
|
|
626
|
+
*/
|
|
627
|
+
private int getOptionalInt(ReadableMap map, String key) {
|
|
628
|
+
if (map.hasKey(key) && !map.isNull(key)) {
|
|
629
|
+
return map.getInt(key);
|
|
630
|
+
}
|
|
631
|
+
return 0;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* 读取文件路径并兼容 content:// 和 file://。
|
|
636
|
+
*
|
|
637
|
+
* @param map 原始消息内容
|
|
638
|
+
* @param key 字段名
|
|
639
|
+
* @return 原生 SDK 可读取的本地文件路径
|
|
640
|
+
*/
|
|
641
|
+
private String getOptionalFilePath(ReadableMap map, String key) {
|
|
642
|
+
String path = getOptionalString(map, key);
|
|
643
|
+
if (path.isEmpty()) {
|
|
644
|
+
return "";
|
|
645
|
+
}
|
|
646
|
+
return FileUtils.convertContentUriToFile(getReactApplicationContext(), path);
|
|
647
|
+
}
|
|
648
|
+
|
|
595
649
|
private MessageContent convertMapToMessageContent(ReadableMap map) {
|
|
596
650
|
String contentType = map.getString("contentType");
|
|
597
651
|
switch (contentType) {
|
|
@@ -632,6 +686,30 @@ public class JuggleIMManager extends ReactContextBaseJavaModule {
|
|
|
632
686
|
voice.setExtra(map.getString("extra"));
|
|
633
687
|
}
|
|
634
688
|
return voice;
|
|
689
|
+
case "jg:video":
|
|
690
|
+
VideoMessage video = new VideoMessage();
|
|
691
|
+
String localPath = getOptionalFilePath(map, "localPath");
|
|
692
|
+
if (localPath.isEmpty()) {
|
|
693
|
+
localPath = getOptionalFilePath(map, "local");
|
|
694
|
+
}
|
|
695
|
+
video.setLocalPath(localPath);
|
|
696
|
+
video.setUrl(getOptionalString(map, "url"));
|
|
697
|
+
String snapshotUrl = getOptionalString(map, "snapshotUrl");
|
|
698
|
+
if (snapshotUrl.isEmpty()) {
|
|
699
|
+
snapshotUrl = getOptionalString(map, "poster");
|
|
700
|
+
}
|
|
701
|
+
video.setSnapshotUrl(snapshotUrl);
|
|
702
|
+
video.setSnapshotLocalPath(getOptionalFilePath(map, "snapshotLocalPath"));
|
|
703
|
+
video.setWidth(getOptionalInt(map, "width"));
|
|
704
|
+
video.setHeight(getOptionalInt(map, "height"));
|
|
705
|
+
if (map.hasKey("size") && !map.isNull("size")) {
|
|
706
|
+
video.setSize((long) map.getDouble("size"));
|
|
707
|
+
}
|
|
708
|
+
video.setDuration(getOptionalInt(map, "duration"));
|
|
709
|
+
if (map.hasKey("extra")) {
|
|
710
|
+
video.setExtra(map.getString("extra"));
|
|
711
|
+
}
|
|
712
|
+
return video;
|
|
635
713
|
case "jg:streamtext":
|
|
636
714
|
StreamTextMessage streamText = new StreamTextMessage();
|
|
637
715
|
if (map.hasKey("content")) {
|
package/ios/JModelFactory.m
CHANGED
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
JVideoMessage *video = (JVideoMessage *)content;
|
|
102
102
|
NSDictionary *dic = @{
|
|
103
103
|
@"url" : video.url ?: @"",
|
|
104
|
-
@"
|
|
105
|
-
@"
|
|
104
|
+
@"localPath" : video.localPath ?: @"",
|
|
105
|
+
@"snapshotUrl" : video.snapshotUrl ?: @"",
|
|
106
106
|
@"height" : @(video.height),
|
|
107
107
|
@"width" : @(video.width),
|
|
108
108
|
@"size" : @(video.size),
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//
|
|
2
|
+
// JRNCustomMessageContent.h
|
|
3
|
+
// juggleim-rnsdk
|
|
4
|
+
//
|
|
5
|
+
// RN 自定义消息的通用承载类。
|
|
6
|
+
//
|
|
7
|
+
// 原生 JuggleIM SDK 要求自定义消息类型必须通过 messageManager 的
|
|
8
|
+
// registerContentType: 注册,否则 SDK 无法解析该类型——表现为会话列表的
|
|
9
|
+
// lastMessage 变成空壳(messageId/contentType 为空,content.contentType
|
|
10
|
+
// 回退成 "jg:unknown")。详见 JMessageProtocol.h 与 JMessageContent.h
|
|
11
|
+
// (conversationDigest 注释:会话列表中显示的消息摘要)。
|
|
12
|
+
//
|
|
13
|
+
// RN 层只持有类型字符串、没有逐类型的 ObjC 类,因此用本类做透传:
|
|
14
|
+
// decode: 仅保存原始字节,encode 原样返回,由 RN 层自行解析 JSON。
|
|
15
|
+
// 每个 contentType 在运行时动态生成一个子类(仅重写 +contentType)。
|
|
16
|
+
//
|
|
17
|
+
|
|
18
|
+
#import <JuggleIM/JuggleIM.h>
|
|
19
|
+
|
|
20
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
21
|
+
|
|
22
|
+
@interface JRNCustomMessageContent : JMessageContent
|
|
23
|
+
|
|
24
|
+
/// 原始消息内容字节(即业务 JSON),由 SDK decode: 填入、encode 原样取出。
|
|
25
|
+
@property (nonatomic, strong, nullable) NSData *rawData;
|
|
26
|
+
|
|
27
|
+
/// 为指定 contentType 动态创建并返回可注册的子类(幂等,可重复调用)。
|
|
28
|
+
+ (Class)registerableClassForContentType:(NSString *)contentType;
|
|
29
|
+
|
|
30
|
+
@end
|
|
31
|
+
|
|
32
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//
|
|
2
|
+
// JRNCustomMessageContent.m
|
|
3
|
+
// juggleim-rnsdk
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
#import "JRNCustomMessageContent.h"
|
|
7
|
+
#import <objc/runtime.h>
|
|
8
|
+
|
|
9
|
+
@implementation JRNCustomMessageContent
|
|
10
|
+
|
|
11
|
+
// 基类占位,实际类型由动态子类重写返回。
|
|
12
|
+
+ (NSString *)contentType {
|
|
13
|
+
return @"jg:rn:custom";
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
- (NSData *)encode {
|
|
17
|
+
return self.rawData ?: [NSData data];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
- (void)decode:(NSData *)data {
|
|
21
|
+
self.rawData = data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 会话摘要由 RN 层渲染,这里返回空串即可,
|
|
25
|
+
// 关键是「能被解析」从而让会话列表 lastMessage 正常填充。
|
|
26
|
+
- (NSString *)conversationDigest {
|
|
27
|
+
return @"";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
+ (Class)registerableClassForContentType:(NSString *)contentType {
|
|
31
|
+
if (contentType.length == 0) {
|
|
32
|
+
return [JRNCustomMessageContent class];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// 类名需为合法标识符(去掉冒号等非字母数字字符);
|
|
36
|
+
// 注意 +contentType 仍返回原始字符串(含冒号),SDK 据此做类型映射。
|
|
37
|
+
NSMutableString *safe = [NSMutableString stringWithString:@"JRNCustom_"];
|
|
38
|
+
for (NSUInteger i = 0; i < contentType.length; i++) {
|
|
39
|
+
unichar c = [contentType characterAtIndex:i];
|
|
40
|
+
BOOL isAlnum = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
|
|
41
|
+
(c >= '0' && c <= '9');
|
|
42
|
+
[safe appendString:isAlnum ? [NSString stringWithFormat:@"%C", c] : @"_"];
|
|
43
|
+
}
|
|
44
|
+
const char *className = safe.UTF8String;
|
|
45
|
+
|
|
46
|
+
Class existing = objc_getClass(className);
|
|
47
|
+
if (existing) {
|
|
48
|
+
return existing;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
Class cls = objc_allocateClassPair([JRNCustomMessageContent class], className, 0);
|
|
52
|
+
if (!cls) {
|
|
53
|
+
// 并发/重名兜底
|
|
54
|
+
return objc_getClass(className) ?: [JRNCustomMessageContent class];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// 在元类上重写 + (NSString *)contentType,返回原始 contentType。
|
|
58
|
+
NSString *typeCopy = [contentType copy];
|
|
59
|
+
IMP ctImp = imp_implementationWithBlock(^NSString *(id _self) {
|
|
60
|
+
return typeCopy;
|
|
61
|
+
});
|
|
62
|
+
Class meta = object_getClass(cls);
|
|
63
|
+
class_addMethod(meta, @selector(contentType), ctImp, "@@:");
|
|
64
|
+
|
|
65
|
+
objc_registerClassPair(cls);
|
|
66
|
+
return cls;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@end
|
package/ios/JuggleIMManager.m
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#import "JuggleIMManager.h"
|
|
2
|
+
#import "JRNCustomMessageContent.h"
|
|
2
3
|
#import <JuggleIM/JuggleIM.h>
|
|
3
4
|
#import <React/RCTEventEmitter.h>
|
|
4
5
|
|
|
@@ -44,6 +45,15 @@ RCT_EXPORT_METHOD(registerCustomMessageType : (NSString *)contentType) {
|
|
|
44
45
|
return;
|
|
45
46
|
}
|
|
46
47
|
self.customMessageTypes[contentType] = contentType;
|
|
48
|
+
|
|
49
|
+
// fix: 向原生 SDK 注册自定义消息类。
|
|
50
|
+
// 原因: 未注册的自定义类型,SDK 无法解析会话列表的 lastMessage(详见
|
|
51
|
+
// JMessageProtocol.h registerContentType: 注释),导致 lastMessage
|
|
52
|
+
// 退化为空壳、content.contentType 变为 "jg:unknown"(详情页走 getMessages
|
|
53
|
+
// 不受影响,故仅会话列表显示 unknown;Android SDK 无此限制故正常)。
|
|
54
|
+
Class cls = [JRNCustomMessageContent registerableClassForContentType:contentType];
|
|
55
|
+
[JIM.shared.messageManager registerContentType:cls];
|
|
56
|
+
|
|
47
57
|
NSLog(@"注册自定义消息类型: %@", contentType);
|
|
48
58
|
}
|
|
49
59
|
|
|
@@ -511,6 +521,17 @@ RCT_EXPORT_METHOD(addConversationDelegate) {
|
|
|
511
521
|
dict[@"localPath"] = voiceMsg.localPath ?: @"";
|
|
512
522
|
dict[@"duration"] = @(voiceMsg.duration);
|
|
513
523
|
dict[@"extra"] = voiceMsg.extra ?: @"";
|
|
524
|
+
} else if ([content isKindOfClass:[JVideoMessage class]]) {
|
|
525
|
+
JVideoMessage *videoMsg = (JVideoMessage *)content;
|
|
526
|
+
dict[@"url"] = videoMsg.url ?: @"";
|
|
527
|
+
dict[@"localPath"] = videoMsg.localPath ?: @"";
|
|
528
|
+
dict[@"snapshotUrl"] = videoMsg.snapshotUrl ?: @"";
|
|
529
|
+
dict[@"snapshotLocalPath"] = videoMsg.snapshotLocalPath ?: @"";
|
|
530
|
+
dict[@"width"] = @(videoMsg.width);
|
|
531
|
+
dict[@"height"] = @(videoMsg.height);
|
|
532
|
+
dict[@"size"] = @(videoMsg.size);
|
|
533
|
+
dict[@"duration"] = @(videoMsg.duration);
|
|
534
|
+
dict[@"extra"] = videoMsg.extra ?: @"";
|
|
514
535
|
} else if ([content isKindOfClass:[JStreamTextMessage class]]) {
|
|
515
536
|
JStreamTextMessage *streamMsg = (JStreamTextMessage *)content;
|
|
516
537
|
dict[@"content"] = streamMsg.content ?: @"";
|
|
@@ -1685,6 +1706,20 @@ RCT_EXPORT_METHOD(removeMessageReaction : (
|
|
|
1685
1706
|
voice.extra = messageDict[@"extra"];
|
|
1686
1707
|
}
|
|
1687
1708
|
return voice;
|
|
1709
|
+
} else if ([contentType isEqualToString:@"jg:video"]) {
|
|
1710
|
+
JVideoMessage *video = [[JVideoMessage alloc] init];
|
|
1711
|
+
video.url = messageDict[@"url"];
|
|
1712
|
+
video.localPath = messageDict[@"localPath"] ?: messageDict[@"local"];
|
|
1713
|
+
video.snapshotUrl = messageDict[@"snapshotUrl"] ?: messageDict[@"poster"];
|
|
1714
|
+
video.snapshotLocalPath = messageDict[@"snapshotLocalPath"];
|
|
1715
|
+
video.width = [messageDict[@"width"] integerValue];
|
|
1716
|
+
video.height = [messageDict[@"height"] integerValue];
|
|
1717
|
+
video.size = [messageDict[@"size"] longLongValue];
|
|
1718
|
+
video.duration = [messageDict[@"duration"] integerValue];
|
|
1719
|
+
if (messageDict[@"extra"]) {
|
|
1720
|
+
video.extra = messageDict[@"extra"];
|
|
1721
|
+
}
|
|
1722
|
+
return video;
|
|
1688
1723
|
} else if ([contentType isEqualToString:@"jg:streamtext"]) {
|
|
1689
1724
|
JStreamTextMessage *streamText = [[JStreamTextMessage alloc] init];
|
|
1690
1725
|
streamText.content = messageDict[@"content"] ?: @"";
|
package/package.json
CHANGED
package/src/types.d.ts
CHANGED
|
@@ -198,6 +198,31 @@ export class VoiceMessageContent extends MessageContent {
|
|
|
198
198
|
contentType: string;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
/**
|
|
202
|
+
* 视频消息内容
|
|
203
|
+
* @property {string} localPath - 视频本地路径:支持 /、file://、content://
|
|
204
|
+
* @property {string} [url] - 视频远程URL
|
|
205
|
+
* @property {string} [snapshotUrl] - 视频封面远程URL
|
|
206
|
+
* @property {string} [snapshotLocalPath] - 视频封面本地路径
|
|
207
|
+
* @property {number} width - 视频宽度
|
|
208
|
+
* @property {number} height - 视频高度
|
|
209
|
+
* @property {number} size - 视频文件大小,单位字节
|
|
210
|
+
* @property {number} duration - 视频时长,单位秒
|
|
211
|
+
*/
|
|
212
|
+
export class VideoMessageContent extends MessageContent {
|
|
213
|
+
localPath: string;
|
|
214
|
+
url?: string;
|
|
215
|
+
snapshotUrl?: string;
|
|
216
|
+
snapshotLocalPath?: string;
|
|
217
|
+
width: number;
|
|
218
|
+
height: number;
|
|
219
|
+
size: number;
|
|
220
|
+
duration: number;
|
|
221
|
+
extra?: string;
|
|
222
|
+
|
|
223
|
+
contentType: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
201
226
|
/**
|
|
202
227
|
* 通话结束通知消息内容: jg:callfinishntf
|
|
203
228
|
* @property {number} reason - 结束原因
|
package/src/types.js
CHANGED
|
@@ -133,6 +133,21 @@ export class VoiceMessageContent extends MessageContent {
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* 视频消息内容
|
|
138
|
+
*/
|
|
139
|
+
export class VideoMessageContent extends MessageContent {
|
|
140
|
+
constructor(localPath, width, height, duration, size = 0) {
|
|
141
|
+
super();
|
|
142
|
+
this.contentType = "jg:video";
|
|
143
|
+
this.localPath = localPath;
|
|
144
|
+
this.width = width;
|
|
145
|
+
this.height = height;
|
|
146
|
+
this.duration = duration;
|
|
147
|
+
this.size = size;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
136
151
|
/**
|
|
137
152
|
* 流式文本消息内容
|
|
138
153
|
*/
|