Skip to content

Commit bb3861d

Browse files
authored
Merge pull request #777 from GetStream/develop
Next release
2 parents f1cb91e + 4b00499 commit bb3861d

File tree

27 files changed

+232
-84
lines changed

27 files changed

+232
-84
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
**Note:** This prop is available only in SDK version >= [v3.7.0](https://github.com/GetStream/stream-chat-react-native/releases)
2+
3+
Allow user to be muted via message action.
4+
The default value is supplied by the [channel config](https://getstream.io/chat/docs/javascript/channel_features/).
5+
6+
| Type |
7+
| - |
8+
| boolean |

docusaurus/docs/reactnative/contexts/messages_context.mdx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,24 @@ import MessageSimple from '../common-content/core-components/channel/props/messa
5454
import MessageStatus from '../common-content/core-components/channel/props/message_status.mdx';
5555
import MessageSystem from '../common-content/core-components/channel/props/message_system.mdx';
5656
import MessageText from '../common-content/core-components/channel/props/message_text.mdx';
57+
import MutesEnabled from '../common-content/core-components/channel/props/mutes_enabled.mdx';
5758
import MuteUser from '../common-content/core-components/channel/props/mute_user.mdx';
5859
import MyMessageTheme from '../common-content/core-components/channel/props/my_message_theme.mdx';
5960
import OnDoubleTapMessage from '../common-content/core-components/channel/props/on_double_tap_message.mdx';
6061
import OnLongPressMessage from '../common-content/core-components/channel/props/on_long_press_message.mdx';
6162
import OnPressInMessage from '../common-content/core-components/channel/props/on_press_in_message.mdx';
6263
import OnPressMessage from '../common-content/core-components/channel/props/on_press_message.mdx';
6364
import OverlayReactionList from '../common-content/core-components/overlay-provider/props/overlay_reaction_list.mdx';
65+
import QuotedRepliesEnabled from '../common-content/core-components/channel/props/quoted_replies_enabled.mdx';
6466
import QuotedReply from '../common-content/core-components/channel/props/quoted_reply.mdx';
6567
import ReactionList from '../common-content/core-components/channel/props/reaction_list.mdx';
68+
import ReactionsEnabled from '../common-content/core-components/channel/props/reactions_enabled.mdx';
6669
import Reply from '../common-content/core-components/channel/props/reply.mdx';
6770
import Retry from '../common-content/core-components/channel/props/retry.mdx';
6871
import ScrollToBottomButton from '../common-content/core-components/channel/props/scroll_to_bottom_button.mdx';
6972
import SelectReaction from '../common-content/core-components/channel/props/select_reaction.mdx';
7073
import SupportedReactions from '../common-content/core-components/channel/props/supported_reactions.mdx';
74+
import ThreadRepliesEnabled from '../common-content/core-components/channel/props/thread_replies_enabled.mdx';
7175
import ThreadReply from '../common-content/core-components/channel/props/thread_reply.mdx';
7276
import TypingIndicator from '../common-content/core-components/channel/props/typing_indicator.mdx';
7377
import TypingIndicatorContainer from '../common-content/core-components/channel/props/typing_indicator_container.mdx';
@@ -183,6 +187,10 @@ Id of current channel.
183187

184188
<MessageContentOrder />
185189

190+
### <div class="label description">_forwarded from [Channel](../core-components/channel.mdx#mutesenabled)_ props</div> mutesEnabled {#mutesenabled}
191+
192+
<MutesEnabled />
193+
186194
### <div class="label description">_forwarded from [Channel](../core-components/channel.mdx#muteuser)_ props</div> muteUser {#muteuser}
187195

188196
<MuteUser />
@@ -207,10 +215,19 @@ Id of current channel.
207215

208216
<OnPressMessage />
209217

218+
### <div class="label description">_forwarded from [Channel](../core-components/channel.mdx#quotedrepliesenabled)_ props</div> quotedRepliesEnabled {#quotedrepliesenabled}
219+
220+
<QuotedRepliesEnabled />
221+
210222
### <div class="label description">_forwarded from [Channel](../core-components/channel.mdx#quotedreply)_ props</div> quotedReply {#quotedreply}
211223

212224
<QuotedReply />
213225

226+
### <div class="label description">_forwarded from [Channel](../core-components/channel.mdx#reactionsenabled)_ props</div> reactionsEnabled {#reactionsenabled}
227+
228+
<ReactionsEnabled />
229+
230+
214231
### removeMessage
215232

216233
Function to remove message from local channel state. Please note that this function is only for updating the local state, it doesn't call the api for deleting message (`channel.deleteMessage`).
@@ -235,7 +252,6 @@ Function to re-attempt sending failed message.
235252
| - |
236253
| `(message) => void` |
237254

238-
239255
### <div class="label description">_forwarded from [Channel](../core-components/channel.mdx#selectreaction)_ props</div> selectReaction {#selectreaction}
240256

241257
<SelectReaction />
@@ -260,6 +276,10 @@ Enables quoted-reply state on given message.
260276

261277
<SupportedReactions />
262278

279+
### <div class="label description">_forwarded from [Channel](../core-components/channel.mdx#threadrepliesenabled)_ props</div> threadRepliesEnabled {#threadrepliesenabled}
280+
281+
<ThreadRepliesEnabled />
282+
263283
### <div class="label description">_forwarded from [Channel](../core-components/channel.mdx#threadreply)_ props</div> threadReply {#threadreply}
264284

265285
<ThreadReply />

docusaurus/docs/reactnative/core-components/channel.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ import MessageStatus from '../common-content/core-components/channel/props/messa
8888
import MessageSystem from '../common-content/core-components/channel/props/message_system.mdx';
8989
import MessageText from '../common-content/core-components/channel/props/message_text.mdx';
9090
import MoreOptionsButton from '../common-content/core-components/channel/props/more_options_button.mdx';
91+
import MutesEnabled from '../common-content/core-components/channel/props/mutes_enabled.mdx';
9192
import MuteUser from '../common-content/core-components/channel/props/mute_user.mdx';
9293
import MyMessageTheme from '../common-content/core-components/channel/props/my_message_theme.mdx';
9394
import NumberOfLines from '../common-content/core-components/channel/props/number_of_lines.mdx'
@@ -568,6 +569,10 @@ Load the channel at a specified message instead of the most recent message.
568569

569570
Provide a custom array of messages to render in `MessageList`. -->
570571

572+
### mutesEnabled
573+
574+
<MutesEnabled />
575+
571576
### muteUser
572577

573578
<MuteUser />

docusaurus/docs/reactnative/guides/message_actions_customization.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,14 @@ messageActions={({
5353
isThreadMessage, // boolean;
5454
message, // MessageType<At, Ch, Co, Ev, Me, Re, Us>;
5555
messageReactions, // boolean;
56+
mutesEnabled, // boolean
5657
muteUser, // MessageAction | null;
58+
reactionsEnabled, // boolean
5759
reply, // MessageAction | null;
5860
retry, // MessageAction | null;
5961
threadReply, // MessageAction | null;
60-
repliesEnabled, // boolean;
62+
threadRepliesEnabled, // boolean;
63+
quotedRepliesEnabled, // boolean;
6164
}) => {
6265
return [] // Array<MessageAction>
6366
}}

examples/SampleApp/ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -706,9 +706,9 @@ EXTERNAL SOURCES:
706706
SPEC CHECKSUMS:
707707
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
708708
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
709-
DoubleConversion: cde416483dac037923206447da6e1454df403714
709+
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
710710
FBLazyVector: 7b423f9e248eae65987838148c36eec1dbfe0b53
711-
FBReactNativeSpec: e92e80c70dfd2f0b040ecc050b354d853f784780
711+
FBReactNativeSpec: 9fc430e51b1638f54c19c48123394b806d9483a5
712712
Firebase: 73c3e3b216ec1ecbc54d2ffdd4670c65c749edb1
713713
FirebaseAnalytics: dcb92c7c9ef4fa7ffac276e8f87bd4fc8c97f1b8
714714
FirebaseAppDistribution: 6b9a20f093001a1be1ec78e0687a6b3750f75e35
@@ -723,7 +723,7 @@ SPEC CHECKSUMS:
723723
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
724724
Flipper-RSocket: 127954abe8b162fcaf68d2134d34dc2bd7076154
725725
FlipperKit: 8a20b5c5fcf9436cac58551dc049867247f64b00
726-
glog: 2ad46e202fbaa5641fceb4b2af37dcd88fd8762d
726+
glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62
727727
GoogleAppMeasurement: c6bbc9753d046b5456dd4f940057fbad2c28419e
728728
GoogleDataTransport: 11e3a5f2c190327df1a4a5d7e7ae3d4d5b9c9e4c
729729
GoogleUtilities: f8a43108b38a68eebe8b3540e1f4f2d28843ce20
@@ -732,7 +732,7 @@ SPEC CHECKSUMS:
732732
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
733733
OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b
734734
PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97
735-
RCT-Folly: 91521e05ace43e89980cabd1fb54685f7827ddb9
735+
RCT-Folly: ec7a233ccc97cc556cf7237f0db1ff65b986f27c
736736
RCTRequired: ec2ebc96b7bfba3ca5c32740f5a0c6a014a274d2
737737
RCTTypeSafety: 22567f31e67c3e088c7ac23ea46ab6d4779c0ea5
738738
React: a241e3dbb1e91d06332f1dbd2b3ab26e1a4c4b9d

examples/SampleApp/src/hooks/usePaginatedUsers.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,15 @@ export const usePaginatedUsers = (): PaginatedUsers => {
109109
};
110110

111111
const fetchUsers = async (query = '') => {
112-
if (queryInProgress.current) return;
112+
if (queryInProgress.current || !chatClient?.userID) return;
113113
setLoading(true);
114114

115115
try {
116116
queryInProgress.current = true;
117117
const filter: UserFilters = {
118+
id: {
119+
$nin: [chatClient?.userID],
120+
},
118121
role: 'user',
119122
};
120123

examples/SampleApp/src/screens/GroupChannelDetailsScreen.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { RemoveUser } from '../icons/RemoveUser';
3636
import { getUserActivityStatus } from '../utils/getUserActivityStatus';
3737

3838
import type { StackNavigationProp } from '@react-navigation/stack';
39-
import type { Channel } from 'stream-chat';
39+
import type { Channel, UserResponse } from 'stream-chat';
4040

4141
import type {
4242
LocalAttachmentType,
@@ -204,6 +204,9 @@ export const GroupChannelDetailsScreen: React.FC<GroupChannelDetailsProps> = ({
204204

205205
if (!channel) return null;
206206

207+
const channelCreatorId =
208+
channel.data && (channel.data.created_by_id || (channel.data.created_by as UserResponse)?.id);
209+
207210
/**
208211
* Opens confirmation sheet for leaving the group
209212
*/
@@ -302,7 +305,7 @@ export const GroupChannelDetailsScreen: React.FC<GroupChannelDetailsProps> = ({
302305
</View>
303306
</View>
304307
<Text style={{ color: grey }}>
305-
{channel.data?.created_by_id === member.user?.id ? 'owner' : ''}
308+
{channelCreatorId === member.user?.id ? 'owner' : ''}
306309
</Text>
307310
</TouchableOpacity>
308311
);

examples/SampleApp/yarn.lock

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7091,10 +7091,10 @@ stream-buffers@~2.2.0:
70917091
resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4"
70927092
integrity sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=
70937093

7094-
7095-
version "3.6.4"
7096-
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-3.6.4.tgz#dd846d9995ee1f7171abc152acd2c76b9ff76965"
7097-
integrity sha512-0AoEtbEIPBnaCCsMJlUTJ7bQF6Wx3/wRfudOVV0vVjW8BRLgkSL4E1BXFyhvq1S0d2+msQO5izev7zcFT/mpQA==
7094+
7095+
version "3.6.5"
7096+
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-3.6.5.tgz#7e3e292d60f1b5a50ffda39485261a7ab29f5d7b"
7097+
integrity sha512-0VU9RxiTvHQCJvKvbXd8M2kMKEf6VNd5GTIOJetXG0z/SWCJT1IFlwfWE0tap2OA1ocG6uBMbNEK5oFc41HTJw==
70987098
dependencies:
70997099
"@babel/runtime" "7.13.10"
71007100
"@gorhom/bottom-sheet" "3.6.4"
@@ -7133,6 +7133,21 @@ [email protected]:
71337133
jsonwebtoken "^8.5.1"
71347134
ws "^7.4.4"
71357135

7136+
stream-chat@~3.13.1:
7137+
version "3.13.1"
7138+
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-3.13.1.tgz#1692246dd74968dee7596a6a8c1e1a02656bb634"
7139+
integrity sha512-JWgVwRgmAE/a7P9i+LK2Lr2C4dXfRaedm2c4jKsZuMPR6KwINIy0kgdGyds3Xqmp4/LPSfhXZJ7wExmlfo9+7g==
7140+
dependencies:
7141+
"@babel/runtime" "^7.13.10"
7142+
"@types/jsonwebtoken" "^8.5.0"
7143+
"@types/ws" "^7.4.0"
7144+
axios "^0.21.1"
7145+
base64-js "^1.5.1"
7146+
form-data "^4.0.0"
7147+
isomorphic-ws "^4.0.1"
7148+
jsonwebtoken "^8.5.1"
7149+
ws "^7.4.4"
7150+
71367151
strict-uri-encode@^2.0.0:
71377152
version "2.0.0"
71387153
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"@commitlint/cli": "^12.1.4",
1010
"@commitlint/config-conventional": "^12.1.4",
1111
"@semantic-release/changelog": "^5.0.1",
12+
"@semantic-release/exec": "^5.0.0",
1213
"@semantic-release/git": "^9.0.0",
1314
"execa": "^5.1.1",
1415
"husky": "^6.0.0",

package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"path": "0.12.7",
8282
"react-art": "^17.0.2",
8383
"react-native-markdown-package": "1.8.1",
84-
"stream-chat": "3.9.0"
84+
"stream-chat": "~3.13.1"
8585
},
8686
"peerDependencies": {
8787
"react": "^16.8.6",

0 commit comments

Comments
 (0)