Skip to content

Conversation

@laevandus
Copy link
Contributor

@laevandus laevandus commented Oct 29, 2025

🔗 Issue Links

Fixes IOS-1205

🎯 Goal

Use WebSocketClient from StreamCore which has slightly different interface

📝 Summary

Provide bullet points with the most important changes in the codebase.

🛠 Implementation

Provide a detailed description of the implementation and explain your decisions if you find them relevant.

🎨 Showcase

Add relevant screenshots and/or videos/gifs to easily see what this PR changes, if applicable.

Before After
img img

🧪 Manual Testing Notes

Explain how this change can be tested manually, if applicable.

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@laevandus laevandus requested a review from a team as a code owner October 29, 2025 14:33
@laevandus laevandus marked this pull request as draft October 29, 2025 14:33
@coderabbitai
Copy link

coderabbitai bot commented Oct 29, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch v5-stream-core-web-socket-client

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

1 Message
📖 Skipping Danger since the Pull Request is classed as Draft/Work In Progress

Generated by 🚫 Danger

@github-actions
Copy link

Public Interface

- public final class IgnoredEventType: ClientError, @unchecked Sendable  
- 
-   override public var localizedDescription: String

- public struct APIKey: Equatable, Sendable  
- 
-   public let apiKeyString: String
-   
- 
-   public init(_ apiKeyString: String)

- public protocol Event: Sendable

- public enum ConnectionStatus: Equatable, Sendable  
- 
-   case initialized
-   case disconnected(error: ClientError? = nil)
-   case connecting
-   case connected
-   case disconnecting

 public final class HealthCheckEvent: ConnectionEvent, EventDTO, Sendable  
+   
+ 
+   public func healthcheck()-> HealthCheckInfo?

@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

title develop branch diff status
StreamChat 8.26 MB 7.58 MB -701 KB 🚀
StreamChatUI 4.89 MB 5.05 MB +161 KB 🟢

@Stream-SDK-Bot
Copy link
Collaborator

StreamChat XCSize

Object Diff (bytes)
Logger.o -150466
MessageController.o -63215
ChannelController.o -56311
CDNClient.o -42904
WebSocketClient.o -28304
Show 232 more objects
Object Diff (bytes)
RequestEncoder.o +28020
UserListController.o -24498
Chat.o -22527
ErrorPayload.o -20372
MessageEvents.o +18620
CurrentUserController.o -18423
URLSessionWebSocketEngine.o -17338
ConnectionRecoveryHandler.o -11363
RawJSON.o -11025
NotificationEvents.o +9814
MessageReactionDTO.o -9765
Codable+Extensions.o -9105
BackgroundTaskScheduler.o -8973
BaseLogDestination.o -8832
MemberController.o -8524
ChatMessage.o +8064
ChannelRepository.o -8035
ReminderPayloads.o -7939
InternetConnection.o -7764
UserController.o -7700
MessageSearchQuery.o -7108
ThreadEvents.o +6704
Timers.o -6207
ChannelEvents.o +6008
StreamCollection.o -5968
PollController.o -5564
LazyCachedMapCollection.o -5419
OfflineRequestsRepository.o -5372
ClientError.o -5077
ConnectionStatus.o -4849
ChannelWatcherHandler.o -4693
ChannelListLinker.o -4533
LogDestination.o -4329
ChannelList.o -3811
EventNotificationCenter.o -3770
ConnectionRepository.o +3632
ChannelListController.o -3581
MessageReminder.o +3572
EventBatcher.o -3554
AppSettings.o -3492
WebSocketPingController.o -3432
Thread.o +3420
ThreadListController.o -3394
ChatChannelWatcherListController.o -3297
MessageRepository.o -3028
UserSearchController.o -2918
MessageReminderListController.o -2803
Channel.o +2788
EventDecoder.o -2722
MessagePayloads.o +2643
AudioRecording.o -2515
AudioPlaying.o +2341
Atomic.o -2305
LivestreamChannelController.o +2151
MessageSearchController.o +2137
ChatState+Observer.o -2091
SyncOperations.o -2062
ChannelEventsController.o -2024
ThreadDTO.o -1945
Deprecations.o -1884
ChannelDTO.o -1813
StreamCore_-14BA7DE23376E301_PackageProduct +1812
ReadStateHandler.o +1740
PollVoteListController.o -1716
ReactionListController.o -1715
MessageSender.o -1676
MulticastDelegate.o -1668
APIClient.o -1623
ChatClientConfig.o -1566
ChatClient.o +1500
DataController.o -1482
SyncRepository.o -1432
ChannelUpdater.o -1413
UserSearchState.o -1407
PollVoteListController+SwiftUI.o -1406
ChatState.o -1402
UserListQuery.o -1396
ConnectionController.o -1360
MessageReminderListQuery.o -1336
ConsoleLogDestination.o -1304
UnreadMessageLookup.o -1292
UserUpdater.o -1258
ChannelListQuery.o -1210
WebSocketEngine.o -1171
PollDTO.o +1157
Token.o -1025
MemberListState+Observer.o -1017
ReactionEvents.o +1016
ReactionListState+Observer.o -1006
UserListState+Observer.o -958
Foundation.tbd -932
SendMessageInterceptor.o +928
PrefixLogFormatter.o -917
ChatMessageImageAttachment.o -900
UserDTO.o -887
ChannelListState.o +873
SystemEnvironment+XStreamClient.o +871
ConnectedUser.o -870
MessageState+Observer.o -853
TypingEventsSender.o -852
RetryStrategy.o -819
ConnectedUserState.o -807
MessageEditor.o +792
AnyAttachmentPayload.o +791
MemberModelDTO.o -765
ChannelListState+Observer.o +764
ConnectedUserState+Observer.o +749
AuthenticationRepository.o +745
ReactionListUpdater.o -696
EventsController.o -674
MessageController+SwiftUI.o -666
ChannelReadUpdaterMiddleware.o -652
ChannelEditDetailPayload.o +648
MemberListController.o -640
AttachmentDTO.o -631
MessageUpdater.o -609
ChannelController+SwiftUI.o -582
DraftMessage.o -572
AnyAttachmentUpdater.o -566
ChannelListQueryDTO.o -557
PollVoteDTO.o -553
MessageSearchState.o -528
Error+InternetNotAvailable.o -515
PollVoteListQueryDTO.o -497
ChannelMemberListQuery.o -492
ReminderUpdaterMiddleware.o -492
Filter+predicate.o -488
MessageState.o -466
MessagePayload+asModel.o -458
MemberEventMiddleware.o -452
StateBuilder.o -442
PollVoteListQuery.o -408
Filter.o +407
PushPreferenceLevel.o -404
MessageSearch.o -386
UserWatchingEventMiddleware.o -384
MessageSearchState+Observer.o -382
MessageSearchQueryDTO.o -372
TypingStartCleanupMiddleware.o -370
ListChange.o -365
ChannelListSortingKey.o -362
UnreadCount.o -354
RemindersRepository.o -352
AudioQueuePlayer.o +350
MessageAttachmentPayload.o -340
BackgroundDatabaseObserver.o -340
Controller.o +332
CurrentUserDTO.o -325
DatabaseSession.o -324
ChatMessageGiphyAttachment.o -320
ChatClient+Factory.o +316
ReactionListQueryDTO.o -313
MessageReminderDTO.o -300
EventDataProcessorMiddleware.o -300
ChannelMemberListSortingKey.o -300
EventType.o -292
CurrentUserUpdater.o -285
Network.tbd -276
ChatRemoteNotificationHandler.o -247
UserListUpdater.o -239
ChannelVisibilityEventMiddleware.o -228
UserChannelBanEventsMiddleware.o -226
UserController+SwiftUI.o -224
PollsEvents.o +216
PollOptionDTO.o -213
ChannelTruncatedEventMiddleware.o -212
DraftUpdaterMiddleware.o -212
UserUpdateMiddleware.o -212
ChannelMemberListUpdater.o -211
ChannelMemberListQueryDTO.o -210
PushPreferenceDTO.o -208
UserListSortingKey.o -208
ChannelListUpdater.o -206
AsyncOperation.o +206
NSManagedObject+Extensions.o -206
UserPayloads.o -204
MessageTranslationsPayload.o -196
ReactionListState.o -193
MemberListController+SwiftUI.o -192
UserListController+SwiftUI.o -191
ReactionListController+SwiftUI.o -191
ScheduledStreamTimer.o +182
ChannelListController+SwiftUI.o -178
ThreadParticipantDTO.o +176
MessageDTO.o +175
OptionalDecodable.o -169
AITypingEvents.o -160
AttachmentQueueUploader.o -160
ActiveLiveLocationsEndTimeTracker.o -158
MemberEvents.o -148
ConnectionEvents.o -146
MemberList.o +142
AudioSessionConfiguring.o -133
ChatClientFactory.o -132
ReactionList.o -128
ChatClient+ChannelController.o -125
MemberListState.o -121
MarkdownParser.o +120
Combine.tbd -120
UserEvents.o +116
GuestUserTokenPayload.o -112
UserList.o -109
Sequence+CompactMapLoggingError.o -108
PollsRepository.o +105
LogFormatter.o -103
DatabaseContainer.o -102
UserListQueryDTO.o -101
DraftMessagesRepository.o -98
ChatMessageVideoAttachment.o -98
DeviceDTO.o -96
ChannelReadDTO.o -93
ChannelMuteDTO.o -93
AudioAnalysing.o -90
Event.o -86
RequestDecoder.o +85
ChannelId.o -85
AttachmentTypes.o -81
BackgroundEntityDatabaseObserver.o +79
AudioAnalysisEngine.o -78
ChannelType.o -78
AttachmentId.o +76
KeyedDecodingContainer+Array.o -68
MessageSearchController+SwiftUI.o +68
AttachmentUploader.o -64
StringInterpolation+Extensions.o -64
ThreadReadDTO.o +60
EventPayload.o -56
AttachmentDownloader.o +54
CountdownTracker.o +48
ReminderEvents.o -44
StreamRuntimeCheck.o -43
ChatClient+Environment.o -42

@Stream-SDK-Bot
Copy link
Collaborator

StreamChatUI XCSize

Object Diff (bytes)
Task.o -17474
TaskFetchOriginalData.o +15391
AsyncTask.o +14463
ImageCache.o -12301
TaskLoadImage.o -11844
Show 292 more objects
Object Diff (bytes)
ImageDecoding.o -11502
TaskFetchOriginalImageData.o -9455
ChatChannelListItemView.o +8351
ImageTask.o +8277
ImageDecoders+Default.o +6986
Deprecations.o -6872
TaskFetchOriginalImage.o +6305
ImagePipeline+Cache.o +5951
TaskFetchDecodedImage.o -5912
Cache.o +5753
FetchImage.o -5172
ImageLoadingOptions.o +5159
ImagePipelineConfiguration.o -5123
ImageRequest.o +5123
AssetType.o +5065
ImagePipeline+Configuration.o +5037
InputChatMessageView.o +5016
ImagePipeline+Error.o +4837
DataLoader.o +4829
ChatThreadListItemView.o +4694
ImageProcessing.o -4663
ChatMessageDeliveryStatusView.o +4560
AttachmentsPreviewVC.o +4506
ImageViewExtensions.o -4446
ImageProcessors+Resize.o +4429
TaskLoadData.o +4282
ImageResponse.o -4234
ComposerVC.o +4018
QuotedChatMessageView.o +3955
ImagePipeline.o -3950
OperationTask.o -3614
ChatMessageHeaderDecoratorView.o +3550
ImagePipelineDelegate.o -3523
Graphics.o +3309
ImageContainer.o +3232
ChatMessageListVC.o +3229
ImageCaching.o +3205
TaskFetchWithPublisher.o +3062
ImagePipelineCache.o -3055
NSCacheWrapper.o +2929
MessageActionsTransitionController.o +2916
GalleryVC.o +2645
ImageDecoderRegistry.o +2445
AsyncPipelineTask.o +2431
ImagePipelineTask.o -2399
ImageLoading.o -2146
Combine.o -2095
String+Extensions.o -1956
ImageEncoding.o -1865
VideoPlaybackControlView.o +1860
NukeImageLoader.o +1856
ChatMessageReactionsPickerVC.o +1832
ChatMessageReactionAuthorsFlowLayout.o +1819
ChatChannelVC.o +1693
ChatChannelAvatarView.o +1633
Appearance+Images.o -1632
ImageEncoders+ImageIO.o +1627
PollResultsVC.o +1568
VideoAttachmentGalleryPreview.o +1531
StatefulScrollViewPaginationHandler.o +1511
DataPublisher.o +1491
InputTextView.o +1471
Deprecated.o -1409
ContainerStackView.o +1389
SwipeToReplyGestureHandler.o +1386
PollCreationVC.o +1372
StreamModalTransitioningDelegate.o +1364
ChatChannelListVC.o +1288
ImageRequestKeys.o +1264
PollAttachmentView.o +1254
VideoAttachmentGalleryCell.o +1230
ChatMessageVoiceRecordingAttachmentListView+ItemView.o +1174
ImageProcessingOptions.o +1152
ComposerView.o +1076
ZoomAnimator.o +1058
ViewContainerBuilder.o +1024
ChatThreadListVC.o +972
ChatSuggestionsVC.o +956
ChatMessageAttachmentPreviewVC.o +950
SwipeableView.o +945
ChatMessageReactionAuthorsVC.o +928
ImagePipeline+Delegate.o +925
ImagePublisher.o +907
UploadingOverlayView.o +884
ChatChannelHeaderView.o +883
PollAttachmentOptionListView.o +870
ChatReactionsBubbleView.o +847
ChatMessageInteractiveAttachmentView.o +828
ChatMessageListScrollOverlayView.o +828
Atomic.o +820
ChatMessageListView.o +813
VideoLoading.o -813
Extensions.o +796
UIImageView+SwiftyGif.o +787
ListCollectionViewLayout.o +783
ImageEncoders+Default.o +781
ChatChannelListErrorView.o +764
PollCommentListSectionFooterView.o +756
AlertsRouter.o +754
ChatMessageCell.o +745
GalleryCollectionViewCell.o +745
ChatChannelListCollectionViewCell.o +721
ChatChannelSearchVC.o +696
UIView+Extensions.o +693
PollCreationMultipleVotesFeatureCell.o +692
BaseViews.o +676
BannerView.o +670
ChatMessageImageGallery+ImagePreview.o +668
ChatMessageGalleryView.o +666
ChatMessageInteractiveAttachmentView+ActionButton.o +645
CheckboxControl.o +611
ChatMessageListRouter.o +610
BidirectionalPanGestureRecogniser.o +605
CurrentChatUserAvatarView.o +601
DifferenceKit+Stream.o +600
ChatMessageReactionItemView.o +599
ChatMessageActionControl.o +597
MediaButton.o +591
FileAttachmentView.o +586
ChatChannelListLoadingView.o +583
ResumableData.o +574
PollCreationSectionHeaderView.o +565
ChatMessageDeliveryStatusCheckmarkView.o +558
PollCreationOptionCell.o +550
StackedUserAvatarsView.o +546
ChatMessage+Extensions.o -536
ScrollViewPaginationHandler.o +535
ImageResize.o -532
PollCreationTextFieldView.o +529
ChatMessageFileAttachmentListView.o +529
ChatReactionPickerBubbleView.o +524
ChatAvatarView.o +510
ChatThreadListItemCell.o +506
CommandLabelView.o +500
ZoomDismissalInteractionController.o +494
ZoomTransitionController.o +488
ChatMessageVoiceRecordingAttachmentListView.o +487
ChatThreadArrowView.o +483
ChatChannelListLoadingViewCellContentView.o +477
GradientView.o +476
ChatLoadingIndicator.o +476
ClampedView.o +475
PollAttachmentOptionListItemView.o +472
VoiceRecordingAttachmentComposerPreview.o +471
SendButton.o +470
ChatChannelUnreadCountView+SwiftUI.o +470
CooldownView.o +468
ChatChannelListItemView+SwiftUI.o +467
CloseButton.o +467
ShareButton.o +467
ChatMessageContentView+SwiftUI.o +466
ChatChannelAvatarView+SwiftUI.o +465
QuotedChatMessageView+SwiftUI.o +465
AudioVisualizationView.o +458
MixedAttachmentViewInjector.o +455
ChatMessageDefaultReactionsBubbleView.o +453
ChatChannelListEmptyView.o +452
ComposerLinkPreviewView.o +451
ChatChannelListSearchVC.o +450
ChatMentionSuggestionView.o +449
ChatMessageLinkPreviewView.o +446
LockIndicatorView.o +445
CellActionView.o +442
ChatFileAttachmentListView+ItemView.o +439
ChatMessageActionsVC.o +432
NavigationVC.o +428
NSLayoutConstraint+Extensions.o +425
ChatMessageVoiceRecordingAttachmentListView+ItemViewPresenter.o +425
LiveRecordingView.o +409
ImagePrefetcher.o +405
ChatMessagePopupVC.o +402
ChatMessageGiphyView+GiphyBadge.o +399
ChatMessageListDateSeparatorView.o +396
Components.o -395
PlayPauseButton.o +395
PollResultsTableHeaderView.o +394
PollCreationFeatureSwitchView.o +393
PollCreationNameCell.o +392
JumpToUnreadMessagesButton.o +390
ChatPresenceAvatarView.o +386
ScrollToBottomButton.o +384
ChatSuggestionsCollectionViewLayout.o +379
OnlyLinkTappableTextView.o +376
ImageAttachmentGalleryCell.o +374
TextFieldView.o +373
ChatMentionSuggestionCollectionViewCell.o +371
AttachmentPreviewContainer.o +370
VoiceRecordingAttachmentQuotedPreview.o +369
ChatThreadUnreadCountView.o +365
PillButton.o +362
VideoAttachmentComposerPreview.o +362
ChatChannelListLoadingViewCell.o +358
PlayerView.o +358
RecordButton.o +356
UIImage+SwiftyGif.o +356
ChatSuggestionsCollectionView.o +353
Appearance+Formatters.o -352
OnlineIndicatorView.o +351
AttachmentActionButton.o +350
BadgeView.o +349
ChatMessageReactionsView.o +347
ChatMessageLayoutOptions.o -340
TypingAnimationView.o +339
ChatThreadHeaderView.o +336
ChatMessageGiphyView.o +332
PollAllOptionsListVC.o +324
DefaultAttachmentPreviewProvider.o +316
PollAllOptionsListItemCell.o +314
DefaultScrollViewKeyboardHandler.o +312
NavigationRouter.o +296
ImageResultsMapper.o -292
ComposerKeyboardHandler.o +291
PollCreationFeatureCell.o +291
ChatMessageReactionAuthorViewCell.o +289
ChatCommandSuggestionView.o +289
PollResultsSectionFooterView.o +288
PollCommentListVC.o +288
PollResultsVoteItemView.o +287
ChatThreadListEmptyView.o +287
RecordingIndicatorView.o +286
ChatChannelUnreadCountView.o +286
TypingIndicatorView.o +283
TitleContainerView.o +282
SlideToCancelView.o +281
WaveformView.o +276
ChatCommandSuggestionCollectionViewCell.o +275
ChatSuggestionsCollectionReusableView.o +273
ChatUnreadMessagesCountDecorationView.o +273
ChatThreadRepliesCountDecorationView.o +272
ImageDecompression.o +272
ChatReactionPickerReactionsView.o +267
ChatMessagesCountDecorationView.o +267
ChatThreadListHeaderBannerView.o +266
ChatMessageListUnreadCountView.o +266
ChatMessageErrorIndicator.o +261
ChatSuggestionsHeaderView.o +261
ChatThreadListLoadingView.o +261
ChatMessageDecorationView.o +261
ChatThreadListErrorView.o +259
PollCommentListItemView.o +259
ChatMessageBubbleView.o +257
CircularCloseButton.o +255
ShrinkInputButton.o +253
CellSeparatorView.o +253
ChatNavigationBar.o +253
RecordingTipView.o +252
AttachmentButton.o +252
CheckboxButton.o +250
CommandButton.o +249
ConfirmButton.o +249
StreamCDN.o +248
PollCommentListItemCell.o +247
PollResultsVoteItemCell.o +247
ChatThreadVC.o -243
GalleryAttachmentViewInjector.o +237
LinkedList.o +232
ChatUserAvatarView.o +222
Operation.o +194
UnsupportedAttachmentViewInjector.o -191
PollResultsSectionHeaderView.o +180
ImageAttachmentComposerPreview.o +178
PollResultsVoteListVC.o +172
ChatChannelListCollectionViewDelegate.o +169
StreamChat.tbd -168
ChatMessageContentView.o +163
LinkAttachmentViewInjector.o +162
FileAttachmentViewInjector.o +158
PollCommentListSectionHeaderView.o +156
UIStackView+Extensions.o +154
ChatMessageLayoutOptionsResolver.o -151
StreamCore_-14BA7DE23376E301_PackageProduct +144
MarkdownFormatter.o -142
Log.o -140
DataCaching.o +136
SwiftyGifManager.o -124
DataLoading.o +104
VoiceRecordingVC.o +102
Appearance.o +94
ImageIO.tbd +92
ChatMessageReactions+Types.o -92
ChatChannelListRouter.o -74
AnyDifferentiable.o +72
StagedChangeset.o +72
ImageProcessors.o +67
ImageEncoders.o +65
Calendar+StreamCalendar.o +64
L10n.o +60
PollAttachmentViewInjector.o +56
NukeImageProcessor.o -49
ChatMessageListVCDelegate.o -48
ElementPath.o -44
ImageLoaderOptions.o +42

@laevandus laevandus marked this pull request as ready for review October 31, 2025 12:05
@sonarqubecloud
Copy link

@Stream-SDK-Bot
Copy link
Collaborator

SDK Performance

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 6.68 ms 33.2% 🔼 🟢
Duration 2.6 s 2.55 s 1.92% 🔼 🟢
Hitch time ratio 4 ms per s 2.6 ms per s 35.0% 🔼 🟢
Frame rate 75 fps 77.93 fps 3.91% 🔼 🟢
Number of hitches 1 0.4 60.0% 🔼 🟢

set { connectionQueue.async(flags: .barrier) { self._connectionId = newValue }}
}

let webSocketConnectEndpoint = AllocatedUnfairLock<Endpoint<EmptyResponse>?>(nil)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Endpoint used to be in WebSocketClient, but the one from StreamCore does not use endpoint type, so this logic was moved to here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, and it would make it easier to migrate away from endpoints to generated code.

Comment on lines +148 to +152
let event = ConnectionStatusUpdated(webSocketConnectionState: state)
if event.connectionStatus != connectionStatus {
// Publish Connection event with the new state
webSocketClient?.publishEvent(event)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used to be in WebSocketClient. Since this is a custom event, I left it here instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

Comment on lines +164 to +166
syncRepository.syncLocalState {
log.info("Local state sync completed", subsystems: .offlineSupport)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was in WebSocketClient, now it is here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is chat specific logic


/// The type is designed to pre-process some incoming `Event` via middlewares before being published
class EventNotificationCenter: NotificationCenter, @unchecked Sendable {
class PersistentEventNotificationCenter: NotificationCenter, EventNotificationCenter, @unchecked Sendable {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easier to have a different type than trying to migrate this to StreamCore.

Copy link
Contributor

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

set { connectionQueue.async(flags: .barrier) { self._connectionId = newValue }}
}

let webSocketConnectEndpoint = AllocatedUnfairLock<Endpoint<EmptyResponse>?>(nil)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, and it would make it easier to migrate away from endpoints to generated code.

Comment on lines +148 to +152
let event = ConnectionStatusUpdated(webSocketConnectionState: state)
if event.connectionStatus != connectionStatus {
// Publish Connection event with the new state
webSocketClient?.publishEvent(event)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

Comment on lines +164 to +166
syncRepository.syncLocalState {
log.info("Local state sync completed", subsystems: .offlineSupport)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is chat specific logic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants