stream-chat-react-native-core 5.17.0-beta.1 → 5.17.0

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "5.17.0-beta.1"
2
+ "version": "5.17.0"
3
3
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-react-native-core",
3
3
  "description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
4
- "version": "5.17.0-beta.1",
4
+ "version": "5.17.0",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -1605,6 +1605,9 @@ const ChannelWithContext = <
1605
1605
  const clearQuotedMessageState: InputMessageInputContextValue<StreamChatGenerics>['clearQuotedMessageState'] =
1606
1606
  () => setQuotedMessage(false);
1607
1607
 
1608
+ /**
1609
+ * Removes the message from local state
1610
+ */
1608
1611
  const removeMessage: MessagesContextValue<StreamChatGenerics>['removeMessage'] = (message) => {
1609
1612
  if (channel) {
1610
1613
  channel.state.removeMessage(message);
@@ -1668,6 +1671,10 @@ const ChannelWithContext = <
1668
1671
  }
1669
1672
 
1670
1673
  if (!enableOfflineSupport) {
1674
+ if (message.status === MessageStatusTypes.FAILED) {
1675
+ removeMessage(message);
1676
+ return;
1677
+ }
1671
1678
  await client.deleteMessage(message.id);
1672
1679
  return;
1673
1680
  }
package/src/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "5.17.0-beta.1"
2
+ "version": "5.17.0"
3
3
  }