Closed maratal closed 2 weeks ago
The pull request introduces significant changes to the ARTRealtimeChannel
, ARTRealtimeChannelInternal
, and associated classes, focusing on the presence management functionality. The return type of the presence
method has been updated to use a protocol interface, enhancing abstraction. Internal variables have been renamed for clarity, and method calls have been adjusted accordingly. Additionally, modifications to the ARTRealtimeChannels
class improve callback handling and presence management. The changes also extend to the test suite, ensuring robust validation of the new presence handling and error management.
File Path | Change Summary |
---|---|
Source/ARTRealtimeChannel.m | Updated presence method return type to id<ARTRealtimePresenceProtocol> . Renamed _realtimePresence to _internalPresence . Adjusted method calls to reflect new variable. |
Source/ARTRealtimeChannels.m | Changed presence unsubscribe call to use internalPresence . Improved callback handling in release:callback: method. |
Source/PrivateHeaders/Ably/ARTRealtimeChannel+Private.h | Renamed presence property to internalPresence . |
Source/include/Ably/ARTRealtimeChannel.h | Added presence property to ARTRealtimeChannelProtocol . Removed previous presence property from ARTRealtimeChannel . |
Source/include/Ably/ARTRealtimePresence.h | Removed import statement for ARTRealtimeChannel.h . |
Test/Tests/RealtimeClientChannelTests.swift | Updated tests to reference internalPresence . Enhanced error handling and channel state transition tests. |
Test/Tests/RealtimeClientPresenceTests.swift | Renamed internal presence references and updated tests for presence functionality. |
Test/Tests/RestClientPresenceTests.swift | Updated access to members property from internal.presence to internal.internalPresence . |
Objective | Addressed | Explanation |
---|---|---|
Expose presence on ARTRealtimeChannelProtocol (#1994, ECO-5040) | ✅ |
ARTRealtimeChannel
to add a new method for accessing channel properties, related to presence handling.attachOnSubscribe
option in ARTRealtimeChannelOptions
, affecting subscription logic related to presence management.ARTChannelProperties
initializer public, related to modifications in ARTRealtimeChannel
.🐇 In the realm where channels play,
Presence shines both night and day.
With protocols now set to soar,
Our tests ensure we’ll miss no score.
So hop along, let’s celebrate,
For presence management is now first-rate! 🎉
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Channel presence now is exposed publicly as protocol. For internal access
internalPresence
(in internal class) exists, orpresence
, but manually casted to internal when needed.In other words, public channel exposes public
presence
, internal one exposes internalpresence
(but only public properties/methods are visible by default which ofARTRealtimeChannelProtocol
).internalPresence
is for explicit and more convenient way of using internal type.Closes #1994
Summary by CodeRabbit
Release Notes
New Features
presence
property to theARTRealtimeChannelProtocol
, improving access to presence-related capabilities.Bug Fixes
Tests