File tree 4 files changed +16
-8
lines changed
4 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,13 @@ import {
13
13
14
14
import './App.css' ;
15
15
16
+ const params = ( new Proxy ( new URLSearchParams ( window . location . search ) , {
17
+ get : ( searchParams , property ) => searchParams . get ( property as string ) ,
18
+ } ) as unknown ) as Record < string , string | null > ;
19
+
16
20
const apiKey = process . env . REACT_APP_STREAM_KEY as string ;
17
- const userId = process . env . REACT_APP_USER_ID as string ;
18
- const userToken = process . env . REACT_APP_USER_TOKEN as string ;
21
+ const userId = params . uid || ( process . env . REACT_APP_USER_ID as string ) ;
22
+ const userToken = params . ut || ( process . env . REACT_APP_USER_TOKEN as string ) ;
19
23
20
24
const filters : ChannelFilters = { type : 'messaging' , members : { $in : [ userId ] } } ;
21
25
const options : ChannelOptions = { state : true , presence : true , limit : 10 } ;
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ type LocalChannelType = Record<string, unknown>;
32
32
type LocalCommandType = string ;
33
33
type LocalEventType = Record < string , unknown > ;
34
34
type LocalMessageType = Record < string , unknown > ;
35
+ type LocalPollOptionType = Record < string , unknown > ;
36
+ type LocalPollType = Record < string , unknown > ;
35
37
type LocalReactionType = Record < string , unknown > ;
36
38
type LocalUserType = Record < string , unknown > ;
37
39
@@ -41,6 +43,8 @@ type StreamChatGenerics = {
41
43
commandType : LocalCommandType ;
42
44
eventType : LocalEventType ;
43
45
messageType : LocalMessageType ;
46
+ pollOptionType : LocalPollOptionType ;
47
+ pollType : LocalPollType ;
44
48
reactionType : LocalReactionType ;
45
49
userType : LocalUserType ;
46
50
} ;
Original file line number Diff line number Diff line change 104
104
"emoji-mart" : " ^5.4.0" ,
105
105
"react" : " ^18.0.0 || ^17.0.0 || ^16.8.0" ,
106
106
"react-dom" : " ^18.0.0 || ^17.0.0 || ^16.8.0" ,
107
- "stream-chat" : " ^8.30.0 "
107
+ "stream-chat" : " ^8.33.1 "
108
108
},
109
109
"peerDependenciesMeta" : {
110
110
"emoji-mart" : {
226
226
"rollup-plugin-url" : " ^3.0.1" ,
227
227
"rollup-plugin-visualizer" : " ^4.2.0" ,
228
228
"semantic-release" : " ^19.0.5" ,
229
- "stream-chat" : " ^8.30.0 " ,
229
+ "stream-chat" : " ^8.33.1 " ,
230
230
"style-loader" : " ^2.0.0" ,
231
231
"ts-jest" : " ^28.0.8" ,
232
232
"typescript" : " ^4.7.4" ,
Original file line number Diff line number Diff line change @@ -13322,10 +13322,10 @@ stream-browserify@^2.0.1:
13322
13322
inherits "~2.0.1"
13323
13323
readable-stream "^2.0.2"
13324
13324
13325
- stream-chat@^8.30.0 :
13326
- version "8.30.0 "
13327
- resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.30.0 .tgz#47cd05adee04ff7f7b170cac55698474e2819eb4 "
13328
- integrity sha512-UNdCC9P9wM9DBn6hgVby1rSQuAwTovRpoZL5PdvUS3AEIpXCU4tj2zlwCbz2GFA/M9spDfyQsT/c+vbbr7eCAg ==
13325
+ stream-chat@^8.33.1 :
13326
+ version "8.33.1 "
13327
+ resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.33.1 .tgz#d4e7f3bb10ac4564572431922c97e7c4eda7fe3b "
13328
+ integrity sha512-r4vUjjsBTtCER2wEFYJzbgSY7eipPkM9gyQNV5VVdZhegY/NggeinwY1bYpBXBpQ5JIEvNFIWWRPOFYkMae3MQ ==
13329
13329
dependencies:
13330
13330
"@babel/runtime" "^7.16.3"
13331
13331
"@types/jsonwebtoken" "~9.0.0"
You can’t perform that action at this time.
0 commit comments