Releases: GetStream/stream-chat-unity
v4.0.0
🚀 Stateful Client release 🚀
This major update brings the new fully stateful Stream Chat Client! This means that the new client fully handles state management and synchronization between the application and the Stream server. The previously available client was a low-level client providing a simple abstraction layer over the Stream Chat API and handling real-time communication through WebSocket.
Stateful models
We introduce new high-level stateful objects to interact with:
IStreamChannel
IStreamMessage
IStreamUser
IStreamChannelMember
IStreamLocalUserData
which update their state automatically based on your interaction with the Stream Chat API and incoming real-time events handled by the internal WebSocket connection. You can rely on them having the most up-to-date state and easily update your UI by reacting to the events exposed by the stateful models and the instance ofIStreamChatClient
.
Easier features access
The new client as well as the new stateful models make API features usage much simpler through high-level methods like:
channel.AddMembersAsync()
channel.MuteChannelAsync()
message.SendReactionAsync()
message.PinAsync()
message.FlagAsync()
user.MuteAsync()
The API requests are pre-configured with context-specific parameters and due to being accessible through a model object, they're much easier to discover and use than before.
These are only very few examples of how simple it is to interact with Chat API through the new client. Explore our Unity Docs to learn more.
⚠️ Breaking changes
Please note that the new stateful client is named exactly as the previous one and is meant to be a successor of the previous client. The old client and all of the related objects have been renamed. A new client is the primary recommended way of communicating with the Stream server.
- Previous
StreamChatClient
has been renamed toStreamChatLowLevelClient
and moved fromStreamChat.Core
toStreamChat.Core.LowLevelClient
namespace - Likewise, the previous
IStreamChatClient
interface has been renamed toIStreamChatLowLevelClient
and moved fromStreamChat.Core
toStreamChat.Core.LowLevelClient
namespace
Code Samples:
We encourage you to browse through our Samples
folder and check out numerous code examples of how to work with the new Stream Chat Client.
Sample Project:
- Sample project has been refactored to use the new stateful client
v.3.9.0
Deprecated (will be removed in a future release):
EventNotificationMarkRead.UnreadCount
- it duplicates theEventNotificationMarkRead.TotalUnreadCount
StreamChatClient.LocalUser
- it is not updated after the connection (#55) (#60)
Fixes:
- Fix tests not to use obsolete code and therefore show warnings in the logs/console (#68)
- Fix WS exception when disconnecting (#64)
- Remove
UserMute
json attributes &MessageRequest.PinnedBy
type & mark invalid fields as obsolete (#62) - Fix IsDebugEnabled - StreamLogLevel is not a flags enum (#58)
- Fix WebSocket token cancellation and resources cleanup (#59)
- Fix start/stop typing events not containing event type (#53)
- Fix Disconnected event not being triggered when mocking WS Client disconnection in unit test (#51)
- Fix when_stream_client_connection_failed_expect_reconnect not properly simulating scenario (#50)
- Fix invalid data types in DTOs (#48)
- Fix Limit & Offset field types for QueryMembersRequest (#47)
- Change code sample not to use method marked as obsolete (#45)
- Fix ArgumentOutOfRangeException when Closing state is checked (#41)
Improvements:
- Implement missing real-time events and notifications that might come from the WebSocket connection (#67)
- Implement
StreamChatClient.ChannelMutesUpdated
event (#65) - Implement
StreamChatClient.MessageApi.UpdateMessagePartialAsync
(#63) - Implement
StreamChatClient.MessageApi.UploadImageAsync
endpoint + add upload image with resize integration test (#61) - Update DTOs according to Stream Open API spec (#54)
- Remove server-side only fields from DTOs
- Add detailed info to the
Message
ofStreamApiException
in order for Unity Console to present more info (#46) - Add utility method to allow running Task as callback (#44)
- Add config option to control log level (#43)
- Add
RunAsIEnumerator
with argumentless Task (#42)
Sample Project:
- Fixes:
- Fix null refs when during no connection the active channel is null (#57)
v3.6.0
Deprecated (will be removed in a future release):
ChannelState
'sNewMessageAdded
andAddMessage
methods
Fixes:
ConnectionStateChanged
event invalid previous state argument (#33)- Fixed Connection "not being updated" error to not show if the client disconnects before the health event timeout
- Fixed
StreamApiException
passing message to base Exception - Fixed detailed request log not showing for POST
- Added missing
EventMessageNew
fields - Change client state to
Disconnected
if HealthCheck not received - Kill WebSocket if healthcheck not received + Close Websocket on Disconnect
Improvements:
- Client will automatically reconnect whenever a connection gets lost based on reconnect strategy settings (#34)
- Added
SetReconnectStrategy
to allow control of the reconnect strategy
- Added
- Added Moderation API Endpoints & Code Samples:
Unmute
Ban
Unban
ShadowBanUser
RemoveUserShadowBan
QueryBannedUsers
FlagUser
FlagMessage
QueryMessageFlags
- Added ChannelApi API Endpoints & Code Samples:
- Added MessageAip Endpoint & Code Samples:
SearchMessages
(#39)
- Added events:
MessageRead
NotificationMarkRead
Disconnected
- Added
LocalUser
property toIStreamChatClient
- Added XML summaries Stream Chat Client events:
- Improved description & optimized API calls logs (#22)
- Added code samples:
- Added error log if a user forgets to update the connection per frame
- Added option to toggle compilation of SDK unity & integration tests
Sample Project:
- Fixes:
- (Sample Project) Fixed receiving active channel messages after reconnect
- (Sample Project) Fixed null ref exception on app start (#32)
- Improvements:
- Added emojis sprite atlas using Twemoji + Added auto replacing of emoji shortcodes with TMP sprites (#27)
- Added option to mark the message as the last read
- Logs for
MessageRead
&NotificationMarkRead
events - Added connection details info
- Added forcing reconnect based on Unity's NetworkReachability feature
- Added typing indicators
v3.0.0
v3.0.0:
-
Fixes:
- Fixed Sample Project compatibility with .NET 4.x
- Added missing AdditionalProperties mappings
-
Improvements:
- IL2CPP Fully supported (Tested on: IOS, Android, Windows, MacOS)
- Implemented file upload/delete endpoints
- Removed UnityEngine dependencies in StreamChat.Core
- Removed unnecessary allocation in DTOs
- Added code sample & sample project example for video attachment
v2.4.0
v2.4.0:
-
Fixes:
- Fixed number types in DTOs
-
Improvements:
- Added developer token generation
- (Sample Project) Added error popup when auth credentials are invalid
- (Sample Project) Added "create new channel" button & form
- (Sample Project) Fixed popup mouseexit issue
- (Sample Project) Fixed sending message with return key
- Added xml comment tags
- Added code samples to SDK
- Added integration tests
- Added ConnectionStateChanged event
-
Breaking changes:
- Removed server-side fields & methods (DeleteUserAsync, DeleteUsersAsync, DeleteManyUsersAsync)
- Renamed UpdateUsersAsync() -> UpsertUsersAsync() in UserApi
v2.0.0
- Upgraded project to Unity 2021.2.15f1
- Added reconnection max attempts
- Implemented Reactions: Send/Remove
- Added integration tests
- Refactored InputSystem dependency in Sample Project
- changed all internal types to have internal access modifier
v1.0.0
Added:
- Channels Endpoints: CRUD, Query, Show/Hide, Stop watching, Truncate, Mute
- Messages Endpoints: CRUD
- Users Endpoints: CRUD, Query
- Sample project