stream-chat-react-native 5.36.1-beta.2 → 5.36.1-beta.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-react-native",
3
3
  "description": "The official React Native SDK for Stream Chat, a service for building chat applications",
4
- "version": "5.36.1-beta.2",
4
+ "version": "5.36.1-beta.3",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -11,7 +11,7 @@
11
11
  "types": "types/index.d.ts",
12
12
  "dependencies": {
13
13
  "es6-symbol": "^3.1.3",
14
- "stream-chat-react-native-core": "5.36.1-beta.2"
14
+ "stream-chat-react-native-core": "5.36.1-beta.3"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@react-native-camera-roll/camera-roll": ">=5.0.0",
@@ -10,7 +10,9 @@ try {
10
10
  export const pickImage = ImagePicker
11
11
  ? async () => {
12
12
  try {
13
- const result = await ImagePicker.launchImageLibrary({ mediaType: 'mixed' });
13
+ const result = await ImagePicker.launchImageLibrary({
14
+ mediaType: 'mixed',
15
+ });
14
16
  const canceled = result.didCancel;
15
17
  const errorCode = result.errorCode;
16
18
 
@@ -20,7 +22,7 @@ export const pickImage = ImagePicker
20
22
  if (!canceled) {
21
23
  const assets = result.assets.map((asset) => ({
22
24
  ...asset,
23
- duration: asset.duration * 1000, // in milliseconds
25
+ duration: asset.duration ? asset.duration * 1000 : undefined, // in milliseconds
24
26
  name: asset.fileName,
25
27
  size: asset.fileSize,
26
28
  source: 'picker',
@@ -60,6 +60,7 @@ export const takePhoto = ImagePicker
60
60
  }
61
61
  return {
62
62
  cancelled: false,
63
+ size: photo.size,
63
64
  source: 'camera',
64
65
  uri: photo.path,
65
66
  ...size,