Skip to content

Commit

Permalink
Merge pull request #2516 from GetStream/develop
Browse files Browse the repository at this point in the history
Next Release
  • Loading branch information
khushal87 authored May 16, 2024
2 parents f58187e + a9a308a commit 080855d
Show file tree
Hide file tree
Showing 63 changed files with 718 additions and 359 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Component to render message edited label in message when the message is clicked, within [`MessageList`](../../../../ui-components/message-list.mdx). This component is only rendered for messages from other users.

| Type | Default |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ComponentType | [`MessageEditedTimestamp`](https://github.com/GetStream/stream-chat-react-native/blob/develop/package/src/components/Message/MessageSimple/MessageEditedTimestamp.tsx) |
5 changes: 5 additions & 0 deletions docusaurus/docs/reactnative/contexts/messages-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import MessageContent from '../common-content/ui-components/channel/props/messag
import MessageActions from '../common-content/ui-components/channel/props/message_actions.mdx';
import MessageContentOrder from '../common-content/ui-components/channel/props/message_content_order.mdx';
import MessageDeleted from '../common-content/ui-components/channel/props/message-deleted.mdx';
import MessageEditedTimestamp from '../common-content/ui-components/channel/props/message-edited-timestamp.mdx';
import MessageError from '../common-content/ui-components/channel/props/message-error.mdx';
import MessageFooter from '../common-content/ui-components/channel/props/message-footer.mdx';
import MessageHeader from '../common-content/ui-components/channel/props/message-header.mdx';
Expand Down Expand Up @@ -337,6 +338,10 @@ Upserts a given message in local channel state. Please note that this function d

<MessageDeleted />

### <div class="label description">_forwarded from [Channel](../../core-components/channel#messageeditedtimestamp)_ props</div> MessageEditedTimestamp {#messageeditedtimestamp}

<MessageEditedTimestamp />

### <div class="label description">_forwarded from [Channel](../../core-components/channel#messageerror)_ props</div> MessageError {#messageerror}

<MessageError />
Expand Down
5 changes: 5 additions & 0 deletions docusaurus/docs/reactnative/core-components/channel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ import MessageContent from '../common-content/ui-components/channel/props/messag
import MessageActions from '../common-content/ui-components/channel/props/message_actions.mdx';
import MessageContentOrder from '../common-content/ui-components/channel/props/message_content_order.mdx';
import MessageDeleted from '../common-content/ui-components/channel/props/message-deleted.mdx';
import MessageEditedTimestamp from '../common-content/ui-components/channel/props/message-edited-timestamp.mdx';
import MessageError from '../common-content/ui-components/channel/props/message-error.mdx';
import MessageFooter from '../common-content/ui-components/channel/props/message-footer.mdx';
import MessageHeader from '../common-content/ui-components/channel/props/message-header.mdx';
Expand Down Expand Up @@ -900,6 +901,10 @@ Component to render full screen error indicator, when channel fails to load.

<MessageDeleted />

### MessageEditedTimestamp

<MessageEditedTimestamp />

### MessageError

<MessageError />
Expand Down
2 changes: 2 additions & 0 deletions docusaurus/docs/reactnative/guides/custom-message.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ If you want to customize only a specific part of `MessageSimple` component, you
- [MessageFooter](../../core-components/channel#messagefooter)
- [MessageAvatar](../../core-components/channel#messageavatar)
- [MessageBounce](../../core-components/channel#messagebounce)
- [MessageDeleted](../../core-components/channel#messagedeleted)
- [MessageEditedTimestamp](../../core-components/channel#messageeditedtimestamp)
- [MessageStatus](../../core-components/channel#messagestatus)
- [MessageText](../../core-components/channel#messagetext)
- [MessageSystem](../../core-components/channel#messagesystem)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This is the default component provided to the prop [`MessageDeleted`](../../core

## Props

### <div class="label description required">required</div> `formattedDate`
### <div class="label description required">required</div> `date`

DateTime stamp to be shown in footer for deleted message.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
id: message-edited-timestamp
title: MessageEditedTimestamp
---

import MessageProp from '../common-content/contexts/message-context/message.mdx';

Component to render message edited label in message when the message is clicked, within [`MessageList`](./message-list.mdx).

This is the default component provided to the prop [`MessageEditedTimestamp`](../../core-components/channel#messageeditedtimestamp) on the `Channel` component.

## Props

### <div class="label description">_overrides the value from [MessageContext](../../contexts/message-context#message)_</div> `message` {#message}

<MessageProp />

### `calendar`

Whether to show the time in Calendar time format. Calendar time displays time relative to a today's date.

| Type | Default |
| ---------------------- | ----------- |
| `Boolean`\|`undefined` | `undefined` |

### `format`

Format of the date.

| Type | Default |
| --------------------- | ----------- |
| `String`\|`undefined` | `undefined` |

### `formatDate`

Function to format the date.

| Type | Default |
| ----------------------- | ----------- |
| `Function`\|`undefined` | `undefined` |

### `timestamp`

The date to be shown after formatting.

| Type | Default |
| ----------------------------- | ----------- |
| `String`\|`Date`\|`undefined` | `undefined` |
1 change: 1 addition & 0 deletions docusaurus/sidebars-react-native.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"ui-components/message-bounce",
"ui-components/message-content",
"ui-components/message-deleted",
"ui-components/message-edited-timestamp",
"ui-components/message-error",
"ui-components/message-footer",
"ui-components/message-pinned-header",
Expand Down
23 changes: 19 additions & 4 deletions examples/ExpoMessaging/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7327,10 +7327,10 @@ [email protected]:
version "0.0.0"
uid ""

stream-chat-react-native-core@5.28.0:
version "5.28.0"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.28.0.tgz#66449c014e034bf6041f364ccf8f25302b8ff580"
integrity sha512-G+NmlCYPO84OE2p1soNoKRi/RlfM0ICnw3gm5wq8bPWaBvt1XozZuX6usO2+nEGVcdhaKTvXqX5i4+6FEGDPBw==
stream-chat-react-native-core@5.29.0:
version "5.29.0"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.29.0.tgz#b89d5f954c2063316ab6dc254e0b98188f01524d"
integrity sha512-cm8CQUIHPE+hHxM1hVQ6V3ogUJLpGPRZBvMYbJW7+MBdhUTn4+40EqEbqHTEtHdkLgPUmxaDJsh/gFCtVEGgog==
dependencies:
"@gorhom/bottom-sheet" "4.4.8"
dayjs "1.10.5"
Expand Down Expand Up @@ -7363,6 +7363,21 @@ [email protected]:
jsonwebtoken "~9.0.0"
ws "^7.4.4"

[email protected]:
version "8.31.0"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.31.0.tgz#387ed3109ac930e222bf260d98afc37dd1fcb1ac"
integrity sha512-lORUtfDYljoAgRv7QHUADH1QTGydSWo+U8KmUKwv7BZyUZ2JGwh6VZbu9WL4Nmo7PDU7N/Ug0Q5PE59S6WE+OA==
dependencies:
"@babel/runtime" "^7.16.3"
"@types/jsonwebtoken" "~9.0.0"
"@types/ws" "^7.4.0"
axios "^1.6.0"
base64-js "^1.5.1"
form-data "^4.0.0"
isomorphic-ws "^4.0.1"
jsonwebtoken "~9.0.0"
ws "^7.4.4"

stream-slice@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/stream-slice/-/stream-slice-0.1.2.tgz#2dc4f4e1b936fb13f3eb39a2def1932798d07a4b"
Expand Down
23 changes: 19 additions & 4 deletions examples/SampleApp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6825,10 +6825,10 @@ statuses@~1.5.0:
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==

stream-chat-react-native-core@5.28.1:
version "5.28.1"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.28.1.tgz#9bde6c2af43a24e8a5c9d4ca35da19ccef95cb34"
integrity sha512-+vsLbqFmxm6Xyt4U3f2zfNvTTB9cXWTk8gyyw4b2RJ2qMZ/8wuN/luS5xwKdNbBZZCuaDlwuJpWE/x5/ERbpWg==
stream-chat-react-native-core@5.29.0:
version "5.29.0"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.29.0.tgz#b89d5f954c2063316ab6dc254e0b98188f01524d"
integrity sha512-cm8CQUIHPE+hHxM1hVQ6V3ogUJLpGPRZBvMYbJW7+MBdhUTn4+40EqEbqHTEtHdkLgPUmxaDJsh/gFCtVEGgog==
dependencies:
"@gorhom/bottom-sheet" "4.4.8"
dayjs "1.10.5"
Expand Down Expand Up @@ -6865,6 +6865,21 @@ [email protected]:
jsonwebtoken "~9.0.0"
ws "^7.4.4"

[email protected]:
version "8.31.0"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.31.0.tgz#387ed3109ac930e222bf260d98afc37dd1fcb1ac"
integrity sha512-lORUtfDYljoAgRv7QHUADH1QTGydSWo+U8KmUKwv7BZyUZ2JGwh6VZbu9WL4Nmo7PDU7N/Ug0Q5PE59S6WE+OA==
dependencies:
"@babel/runtime" "^7.16.3"
"@types/jsonwebtoken" "~9.0.0"
"@types/ws" "^7.4.0"
axios "^1.6.0"
base64-js "^1.5.1"
form-data "^4.0.0"
isomorphic-ws "^4.0.1"
jsonwebtoken "~9.0.0"
ws "^7.4.4"

strict-uri-encode@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
Expand Down
23 changes: 19 additions & 4 deletions examples/TypeScriptMessaging/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6882,10 +6882,10 @@ statuses@~1.5.0:
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==

stream-chat-react-native-core@5.28.0:
version "5.28.0"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.28.0.tgz#66449c014e034bf6041f364ccf8f25302b8ff580"
integrity sha512-G+NmlCYPO84OE2p1soNoKRi/RlfM0ICnw3gm5wq8bPWaBvt1XozZuX6usO2+nEGVcdhaKTvXqX5i4+6FEGDPBw==
stream-chat-react-native-core@5.29.0:
version "5.29.0"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.29.0.tgz#b89d5f954c2063316ab6dc254e0b98188f01524d"
integrity sha512-cm8CQUIHPE+hHxM1hVQ6V3ogUJLpGPRZBvMYbJW7+MBdhUTn4+40EqEbqHTEtHdkLgPUmxaDJsh/gFCtVEGgog==
dependencies:
"@gorhom/bottom-sheet" "4.4.8"
dayjs "1.10.5"
Expand Down Expand Up @@ -6927,6 +6927,21 @@ [email protected]:
jsonwebtoken "~9.0.0"
ws "^7.4.4"

[email protected]:
version "8.31.0"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.31.0.tgz#387ed3109ac930e222bf260d98afc37dd1fcb1ac"
integrity sha512-lORUtfDYljoAgRv7QHUADH1QTGydSWo+U8KmUKwv7BZyUZ2JGwh6VZbu9WL4Nmo7PDU7N/Ug0Q5PE59S6WE+OA==
dependencies:
"@babel/runtime" "^7.16.3"
"@types/jsonwebtoken" "~9.0.0"
"@types/ws" "^7.4.0"
axios "^1.6.0"
base64-js "^1.5.1"
form-data "^4.0.0"
isomorphic-ws "^4.0.1"
jsonwebtoken "~9.0.0"
ws "^7.4.4"

strict-uri-encode@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
Expand Down
3 changes: 0 additions & 3 deletions package/expo-package/src/handlers/Audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ export const Audio = AudioComponent
? {
startRecording: async (recordingOptions: RecordingOptions, onRecordingStatusUpdate) => {
try {
console.log('Requesting permissions..');
const permissionsGranted = await AudioComponent.getPermissionsAsync().granted;
if (!permissionsGranted) {
await AudioComponent.requestPermissionsAsync();
Expand All @@ -225,7 +224,6 @@ export const Audio = AudioComponent
allowsRecordingIOS: true,
playsInSilentModeIOS: true,
});
console.log('Starting recording..');
const androidOptions = {
audioEncoder: AndroidAudioEncoder.AAC,
extension: '.aac',
Expand Down Expand Up @@ -258,7 +256,6 @@ export const Audio = AudioComponent
},
stopRecording: async () => {
try {
console.log('Stopping recording..');
await AudioComponent.setAudioModeAsync({
allowsRecordingIOS: false,
});
Expand Down
8 changes: 4 additions & 4 deletions package/expo-package/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2929,10 +2929,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4"
integrity sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==

stream-chat-react-native-core@5.28.1:
version "5.28.1"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.28.1.tgz#9bde6c2af43a24e8a5c9d4ca35da19ccef95cb34"
integrity sha512-+vsLbqFmxm6Xyt4U3f2zfNvTTB9cXWTk8gyyw4b2RJ2qMZ/8wuN/luS5xwKdNbBZZCuaDlwuJpWE/x5/ERbpWg==
stream-chat-react-native-core@5.29.0:
version "5.29.0"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.29.0.tgz#b89d5f954c2063316ab6dc254e0b98188f01524d"
integrity sha512-cm8CQUIHPE+hHxM1hVQ6V3ogUJLpGPRZBvMYbJW7+MBdhUTn4+40EqEbqHTEtHdkLgPUmxaDJsh/gFCtVEGgog==
dependencies:
"@gorhom/bottom-sheet" "4.4.8"
dayjs "1.10.5"
Expand Down
16 changes: 7 additions & 9 deletions package/native-package/src/optionalDependencies/Audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ try {
audioRecorderPlayer = new AudioRecorderPackage();
audioRecorderPlayer.setSubscriptionDuration(Platform.OS === 'android' ? 0.1 : 0.06);
} catch (e) {
console.log('react-native-audio-recorder-player is not installed.');
console.log(e);
console.warn('react-native-audio-recorder-player is not installed.');
}

export enum AudioSourceAndroidType {
Expand Down Expand Up @@ -171,16 +171,13 @@ const verifyAndroidPermissions = async () => {
export const Audio = AudioRecorderPackage
? {
pausePlayer: async () => {
console.log('Pause Player..');
await audioRecorderPlayer.pausePlayer();
},
resumePlayer: async () => {
console.log('Resume Player..');
await audioRecorderPlayer.resumePlayer();
},
startPlayer: async (uri, _, onPlaybackStatusUpdate) => {
try {
console.log('Starting Player..');
const playback = await audioRecorderPlayer.startPlayer(uri);
console.log({ playback });
audioRecorderPlayer.addPlayBackListener((status) => {
Expand All @@ -191,7 +188,6 @@ export const Audio = AudioRecorderPackage
}
},
startRecording: async (options: RecordingOptions, onRecordingStatusUpdate) => {
console.log('Starting recording..');
if (Platform.OS === 'android') {
try {
await verifyAndroidPermissions();
Expand Down Expand Up @@ -230,12 +226,14 @@ export const Audio = AudioRecorderPackage
}
},
stopPlayer: async () => {
console.log('Stopping player..');
await audioRecorderPlayer.stopPlayer();
audioRecorderPlayer.removePlayBackListener();
try {
await audioRecorderPlayer.stopPlayer();
audioRecorderPlayer.removePlayBackListener();
} catch (error) {
console.log(error);
}
},
stopRecording: async () => {
console.log('Stopping recording..');
await audioRecorderPlayer.stopRecorder();
audioRecorderPlayer.removeRecordBackListener();
},
Expand Down
8 changes: 4 additions & 4 deletions package/native-package/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4237,10 +4237,10 @@ statuses@~1.5.0:
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==

stream-chat-react-native-core@5.28.1:
version "5.28.1"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.28.1.tgz#9bde6c2af43a24e8a5c9d4ca35da19ccef95cb34"
integrity sha512-+vsLbqFmxm6Xyt4U3f2zfNvTTB9cXWTk8gyyw4b2RJ2qMZ/8wuN/luS5xwKdNbBZZCuaDlwuJpWE/x5/ERbpWg==
stream-chat-react-native-core@5.29.0:
version "5.29.0"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.29.0.tgz#b89d5f954c2063316ab6dc254e0b98188f01524d"
integrity sha512-cm8CQUIHPE+hHxM1hVQ6V3ogUJLpGPRZBvMYbJW7+MBdhUTn4+40EqEbqHTEtHdkLgPUmxaDJsh/gFCtVEGgog==
dependencies:
"@gorhom/bottom-sheet" "4.4.8"
dayjs "1.10.5"
Expand Down
2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"path": "0.12.7",
"react-native-markdown-package": "1.8.2",
"react-native-url-polyfill": "^1.3.0",
"stream-chat": "8.17.0"
"stream-chat": "8.31.0"
},
"peerDependencies": {
"react-native-quick-sqlite": ">=5.1.0",
Expand Down
Loading

0 comments on commit 080855d

Please sign in to comment.