-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: simplify StableWSConnection constructor params #822
Conversation
Size Change: -2.63 kB (1%) Total Size: 261 kB
|
wsBaseURL: Constructor<ChannelType, CommandType, UserType>['wsBaseURL']; | ||
device: Constructor<ChannelType, CommandType, UserType>['device']; | ||
// global from constructor | ||
client: StreamChat<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice touch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Amazing simplification 🌮
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am loving these changes!! Thanks alot @mahboubii ❤️
client_request_id: reqID, | ||
}; | ||
const qs = encodeURIComponent(JSON.stringify(params)); | ||
const token = this.tokenManager.getToken(); | ||
return `${this.wsBaseURL}/connect?json=${qs}&api_key=${this.apiKey}&authorization=${token}&stream-auth-type=${this.authType}&X-Stream-Client=${this.userAgent}`; | ||
const token = this.client.tokenManager.getToken(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really use token
and user_token
and with the same value on this call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, could be an old mistake
CLA
Description of the changes, What, Why and How?
Changelog