Remove Client.subscribe
Description:
The current implementation of Document.subscribe provides sufficient event support corresponding to Channel or Room. To simplify the usage of the Client as a simple Connection object, the Client.subscribe method should be removed.
Why:
Removing Client.subscribe, the system can be streamlined for better usability and consistent functionality.
The current ClientEvent includes four events: StatusChangedEvent, DocumentChangedEvent, StreamConnectionStatusChangedEvent, and DocumentSyncedEvent. Upon reconsideration, it appears some places may still require these events. What do you think about the following modifications?
StatusChangedEvent=activated|deactivated- Since it's not being used, it can be removed for now and added back when needed.
DocumentChangedEvent- This event can be used to detect changes in the document when performing manual sync. It can be moved to
document.subscribe().
- This event can be used to detect changes in the document when performing manual sync. It can be moved to
StreamConnectionStatusChangedEvent=connected|disconnected- Since the watch stream is established for each document, it can be moved to
document.subscribe().
- Since the watch stream is established for each document, it can be moved to
DocumentSyncedEvent=synced|sync-failed- It can be moved to
document.subscribe().
- It can be moved to
Thank you for the detailed investigation. Since there is currently no use case for Client.Subscribe, it may be a good idea to remove it and add it later as needed.