- Allowing listeners for
channel.deletedandnotification.channel_deletedbefore disconnecting the channel from client cc8796e - Fixing issue with presence indicator not updating feff028
- Clear channel from
client.activeChannelswhen its deleted on backend #728 - Remove deleted properties from user objects on client when user-update related events are received #727
- Remove reference to quoted message, when message gets deleted #726
Please note that channel can't be used once its deleted. You will need to re-create the channel using
client.channel(channelType, channelId)call
-
Added following enpoints to client:
createSegmentgetSegmentlistSegmentsupdateSegmentdeleteSegmentcreateCampaigngetCampaignlistCampaignsupdateCampaigndeleteCampaignscheduleCampaignstopCampaignresumeCampaigntestCampaign
-
Removed target user id from payload on
client.sendUserCustomEventfunction 8bfcca3 -
Added
grantfield types to AppSettings 991b8118
- Fixed an issue with event (
message.updated,message.deletedetc) based updates to message list, which can cause messages to go out of sync than desired state. Please read the PR description for more details - #713
-
Updates to
client.search()andchannel.search()endpoint #677- supports sorting results
- returns
nextandpreviousparameters to get the next/previous page of results - supports pagination using the
nextparameter
-
Added new
channel.assignRolesmethod for assigning custom roles to the channel members (#692) -
Switched
pinMessageandunpinMessageto partial update (#712)
- Fixed timer throttling issue, which was introduced with recent release of Chrome browser #698
- Fixed issues with unread count on muted channels #678
client.partialUpdateMessage()to partially update messages #576client.queryMessageFlags()to query flagged messages #676client.createTokenadd support to haveiatclaim while generating tokens #674client.revokeTokens()method to revoke/unrevoke tokens on an application level #674client.revokeUserToken()method to revoke/unrevoke tokens on user level #674client.revokenUsersToken()method to revoke/unrevoke tokens for multiple users at once #674
- Better handling of user.deleted and user.updated events 6eddf39
- When
user.deletedevent is received, mark messages from corresponding user as deleted. - When
user.updatedevent is received, update references of corresponding user in messages.
- When
- Bug with with ChannelState.clean function 28581fd
- Allow overriding of https agent on StreamChat f18e397
const client = StreamChat.getInstance(apiKey, { httpsAgent: new https.Agent({ keepAlive: true, keepAliveMsecs: 6000, }); })
- Updated following types
- Receive unsubscribe handler from
channel.on1ae1fca
const eventHandler = (e) => {
/** handle event here */
};
const { unsubscribe } = channel.on(eventHandler);
// When you want to remove listener:
unsubscribe();- Added extra check in
client.updateMessageto make sure we don't sendmentions_usersas array of user objects. If yes, then convert it to array of userIds (which is what API expects) #647
message.__htmltype is deprecated in favor ofmessage.html#646message.__htmlis ignoredupdateMessagefunction #645
- Add support to set
baseURLfromoptions#644StreamChat.getInstance('key', { baseURL })
Remove call to channel._disconnect from client.closeConnection. For end user this will fix the issue - You can't use a channel after client.disconnect() was called #639
-
Deprecated
client.disconnect. A new method has been introduced as alias -client.disconnectUser -
Introduced following two methods on client:
- client.openConnection - establish a ws connection on current client.
- client.closeConnection - close the ws connection on current client, doesn't remove user
-
Moved call to
setHealth(true), (which marks the connection as healthy) to only after you receive first event on websocket. Please check the description of PR #626 for details.
QueryMembers - Added support for pagination by user_id 0c41232
- Added the
Client.getRateLimitsfunction to retrieve rate limit quotas and usage, with the option to filter per platform and endpoint #631 - Support reactions sync for pinned messages in channel state #629
- Added the
Client.queryBannedUsersfunction to query banned users with optional filters #625
- Clear (set to false)
isUpToDateflag, when channel watcher is disconnected #624
- Change stream client header from
x-stream-clienttoX-Stream-Client#622
- Fixed regression introduced in 3.1.0 causing
ChannelState.messagesnot to update on incoming reaction events #621
- Channel state message list mutation #619
sendMessageaccepts askip_pushflag to skip sending push notifications #608
- Add back some deprecated functions for convenience #615
-
Removed
seamless-immutablelibrary completely for client/channel state management in favor of pure JS objects #602. This will likely require some changes to frontend usage of these states with spread operators for deeply nested data updates -
Changed channel state
messageToImmutablefunction toformatMessage#602 -
channel.sendReaction(messageID: string, reaction: Reaction, user_id?: string, enforce_unique?: boolean)is changed tochannel.sendReaction(messageID: string, reaction: Reaction, options?: { enforce_unique?: boolean }). the removeduser_idparameter should be added toreaction. -
client.setUser()function is removed in favor ofclient.connectUser()#612 -
client.setAnonymousUser()function is removed in favor ofclient.connectAnonymousUser()#612 -
client.updateUser()function is removed in favor ofclient.upsertUser()#612 -
client.updateUsers()function is removed in favor ofclient.upsertUsers()#612 -
client._userAgent()function is removed in favor ofclient.getUserAgent()#612
- Upgrade Dependencies #613
- New
StreamClient.getInstancefunction to be use instead ofnew StreamClient()#599 - Types for file and image upload app configuration #582
- Allow consecutive calls with warning to
client.connectUserfor the same user #600
- Skip sorting channel members while instantiating a channel without id #591
- Ensure uniqe channel per cid on client's activeChannel state #586
- Added types for query by date parameters - b249e0b
- Added missing type definitions around channel config - 9c3067f
- Add thread_participants to MessageResponse and correct pinned types 8e357a8
- Updated/fixed types on event object regarding unread counts. 36e2297
- Added support for quoted messages #561
- Added support for
enforce_uniqueparam on send reaction api. When true, previous reaction (if any) from user will be replaced with new reaction. 27ddd4f - Added event handler for event
reaction.updated27ddd4f - Added new flag on channel state
isUpToDate(please check description for details) 588c0e9 - Fixed types for
client.userd855779
- New
channel.updatePartial()function can be used to set and unset specific fields when it is necessary to retain additional custom data fields on Channel #550 client.testPushSettings()acceptsskipDevicesboolean attribute which skip config/device checks and sending to real devices #548channel.sendReaction()acceptsenforce_uniqueattribute to overwrite existing reactions if any #527
-
deprecate
setUserandsetAnonymousUserin favor ofconnectUserandconnectAnonymousUser#529 -
Update channel read state when a new message is sent #536
-
Removed unused
user_detailsfield fromquery_channels#545 -
MessageResponsetype #551 -
AppSettingstype #541
- Adding
recoverStateOnReconnectoption - #534 - Adding
UpdatedMessagetypescript type
- Reset
unreadCountwhen channel gets truncated #521
- add
custom_eventto channel types #520
- Replace uuid with simple random generator #518
- Duplicate message from current user #509
- Sort direction array for queries #501
- Add
enforce_unique_usernamestoAppSettingsAPIResponsetype #511
- Channel Export #504
- New event
notification.invite_rejected#467 - Channel stopTyping accepts optional
parent_idfor typing in threadsnotification.invite_rejected#505
- Mute users no longer counted in channel unread #498
AppSettingsAPIResponsetype includesimage_moderation_enabled#497- User ban function signature updated #502:
client.banUser('user1', {user_id: 'user2'})is replaced withclient.banUser('user1', {banned_by_id: 'user2'})
- Ban user by ip #485
- Browser file upload incorrect file name #487
- Improve types of
sendMessage(),updateMessage(),ChannelFiltersandAppSettingsAPIResponse#480 #483
- New functions to shadow ban a user from one or all channels #447
// global shadow ban on all channels
client.shadowBan(target_user_id);
client.removeShadowBan(target_user_id);
// channel speceifc shadow ban
channel.shadowBan(target_user_id);
channel.removeShadowBan(target_user_id);- Upgrade dependencies #477
channel.addMessageSortedperformance has been improved. It now accepts an extra parametertimestampChanged: booleanwhich needs to be set for updating a message in the state with the sameidand differentcreated_at#470
- Typing events for thread #445 #445
- Hard deleted messages are removed from
channel.state.messages#454 - Simplify and document flag/unflag functions for server side usage #462
- BlockList types #455
Channel.countUnread()returns correct unread #452typekey-value pair added to image uploads to fix React Native Android image upload failures #464
- Add permission for using frozen channels
UseFrozenChannel#444 SendFileaccepts buffer and other types of streams #448
- Discard reservered fields from
channel.update()#439 - Custom Command handler in
AppSettingsAPIResponserenamed tocustom_action_handler_urlfromcustom_command_url#409 - Regenerate yarn.lock file #449
SendFileproperly check forFileinstances #448
Channel.keystrokenot firing for the first typing event #440
- Added backward compatible types and move type definitions for production out of dev dependencies #432
- Changed ordering of Typescript generics from usage preference based to alphabetical for consistency throughout the project #425
- Fixing possible race condition between warmUp options request and first queryChannels call. 372b22c
- Fixing typescript for
filtersparam in queryChannels endpoint 5e840ba
- Add
warmUpoption for StreamChat constructor, to improve the network latency on api calls 74a9121
- Move @types dependencies to devDependencies #418
- Fix connection recovery of client #414
- Removed unused recovery option from queryChannels api payload #414
- Typescript related fixes 4e538e6
- Add null checks for tests and correct types to reflect null returns on reactions
- Change updateMessage to use Message instead of MessageResponse
-
Added endpoints to enable and disable slow mode 06fe1b2
- enableSlowMode
- disableSlowMode
-
Added endpoints for custom commands f79baa3
- createCommand
- getCommand
- updateCommand
- deleteCommand
- listCommand
-
Typescript related fixes 5f2ae83
- added generic type
CommandType - Fixing backward compatibility related issues
- added generic type
- Library has been migrated to full typescript.
- No breaking changes regarding underlying javascript api.
- The
Eventtype no longer takes a string generic that maps to thetypeproperty of the response. Event now takes multiple high level generics instantiated along with the client and the propertytypeon the response is on of the string unionEventTypes.
- Added timeout for muteUser client method 6f44677
- Removing cross-fetch from rollup externals c7dafb0
- Changing ws issue logs to warn level 1836606
- Add size comparison action #361
- Drop cross-fetch and use Axios for uploads, use local instance of Axios #365
- Drop support for node v11, v13 #372
- Fixing typescript for channel.getCommands 52e562a
- Adding sync endpoint for offline support eb4793f
- Fixing typescript for translateMessage endpoint c9aea32
- Fixing request retry logic upon token expiry ab20729
- Fixing types for setUser function on client 36d04ec
- Added
translateMessagefunction/endpoint to client c5e1462
- Improved channel.config types in typescript file 5524675
- Added support for
user.deletedevent b3c328a
- Fixing issue with connection recovery and queryChannels api call #340
- Introducing queryMembers endpoint #321
- Fixed typescript issues a9fa49c
- Fixing read status issue 3289ae2
- Reverting uuid version change from 1.10.0 due to incompatibility with react-native issue
- Token refresh functionality #327
- Bump uuid version to
8.0.0d1957d9 - Updated typescript for multitenant feature 6160aa6
- Updated flag function signatures to allow server side flagging/unflagging 05c2281
- Disabled presence by default for queryUsers endpoint 26616f5
- Multi-tenant feature
- Ws Disconnect improvements - forcefully assume closed after 1 sec
- Silent message feature
- Breaking: updated typescript namespace to avoid conflict with getstream package
- Fixes: GetStream/stream-js#258
- Fixed types for verifyWebhook function
- Adding missing event types in typescript file - 8ed49dd
- Fixing typescript for StreamChat, Channel and ChannelState classes 2c78981
- Fixing typescript for getConfig function in Channel class 5bf2d7e
- Add types for channel.getConfig()
-
Adding (missing) following permission constants in typescript file 5b08dec
- Allow
- Deny
- AnyResource
- AnyRole
- MaxPriority
- MinPriority
-
Moving following dependencies from devDependencies to dependencies to avoid ts errors regarding missing types 5b08dec
- @types/seamless-immutable
- @types/ws
-
Reverting c5413c0
Commit description: Avoid duplication of reaction, by adding check for existing reaction
Reason:
- latest_reactions only contain 10 reactions. So the added check is not sufficient.
- It will need handle remove reactions as well.
- own_reactions doesn't contain user object always. So that use case will need handling as well.
- Deprecating updateUser and updateUsers api from StreamChat client.
- Introducing alias for updateUser and updateUsers api
- updateUser --> upsertUser
- updateUsers --> upsertUsers
- Fixing typescript for StreamChat constructor 583b528
- Fixing typescript for event subscribers a0c2ef0
- Added typescript for getMessage and getMessagesById endpoint a0c2ef0
- Avoid duplication of reaction, by adding check for existing reaction c5413c0
- Fixing
removeMessagefunction in ChannelState to handle thread message - e67a432 - Fixing typescript file for channel mutes - c7fefa8
- Support for channel mutes
- Support filtering by messages custom fields - #264
- Increment wsID when ws connection is disconnected manually, to ensure any of the callbacks (onclose, onerror etc) are obsolete - 792de5b
- Fixing broken browser bundle - fixes #259
- Allowing
.off(event listener removal) on uninitialized channels - 985155f
- Fixing client.disconnect and connection.disconnect to always return promise - 600da6c
- Fixing type definitions for Reaction object - 08c802e
- Fixing type definitions for channel method on client - f2d99b8
- Adding some more logs for ws connection callback handlers such as onclose, onmessage, onerror - b54fa53
- Added tests for channels operator $in with custom fields - 1896d98
- Fixed types (in typescript declaration file) for sendReaction function in channel - e0aa1fa
- Fixed types (in typescript declaration file) for sendFile and sendImage functions - 346048f
- Added
getMessagesByIdendpoint for channel - cdc2a8e
- Updated devtoken methode (for compatibility with RN). Switching to base64-js - 96c338e
- Fixed types (in typescript declaration file) for setUser function of client - 6139e4e
- Fixed and updated types for partialUpdateUser function - 201257d
- Handling
channel.hiddenevent
- Handling
channel.truncatedevent - Support for system message for addMember/removeMember functionality
- Throw clear errors when trying to build tokens without secret
- Improve client.channel signature, support short-hand with only type and object as well as null or undefined ID (instead of only "")
- Add support for member invites after channel creation.
- Fixing types for client and connection in typescript declaration file.
- Fix for issue #133 - Updating user object in client, when
user.updatedis received corresponding to user of client - Adding types for ChannelData object
- Fixing tests
- File upload issue fix - Allowing File object as valid uri in sendFile function in client.
- Moving @types to devDependencies
- Syncing and improving the typescript declaration file
- Added
channel.hideandchannel.show
- Improving event handling in js client. Earlier, event listeners on client were executed before channel could handle the event and update the state. This has been fixed by handling event completely on client and channel level first before executing any of the listeners on client or channel.
- Added error logs for errors in API calls
- Support $exists operator for queryChannels/queryUsers
- Support hard delete messages for server side auth
- Fixing broken types in ts declaration file : 264ee9a87d6591d39f20b99d1d87381532b9957b
- This library is stable and used in production already, bump to 1.0.0
- Avoid memory leaks server-side when client is created many times
- Track client version with WS
- Add configurable logging
- Bugfix: reconnection and threads' replies are now handled correctly
- Bugfix: replies pagination now works with both ASC and DESC ordering
- Improve reconnection mechanism
- Added populated
channel.datawhen callingchannel.watch()
- Improved channel.unreadCount
- Improved user presence support. If listening to user presence, channel.state.members and channel.state.watchers are now automatically updated with the user's online/offline presence.
- add channel.countUnreadMentions
- improve client.disconnect
- add userID param to add reactions server-side
- add babel runtime to dependencies
- GDPR endpoints: deleteUser, exportUser and deactivateUser
- markRead now supports sending a message_id to mark the channel read up to (and including) that specific message
- added markAllRead client method
- countUnread can be called without any parameters now client-side and it will default to current user's read state
- queryChannels used to return the list of members twice, this has now been resolved. However if you were using the duplicate list of members in channel.members you'll want to update to Object.values(channel.state.members)
- event.own_user renamed to event.me
- user.status.changed renamed to user.presence.changed
- connectResponse.unread renamed to connectResponse.unread_count
- channelState.online renamed to channelState.watcher_count