ably / ably-cocoa

iOS, tvOS and macOS Objective-C and Swift client library SDK for Ably realtime messaging service
https://ably.com/download
Apache License 2.0
46 stars 25 forks source link

Code duplication in channel and presence `subscribe` #1943

Closed maratal closed 4 months ago

maratal commented 4 months ago

In both ARTRealtimeChannelInternal and ARTRealtimePresenceInternal code in subscribeWithAttachCallback: is a dup of subscribe: with a nil event. Should be a single method called from another with parameter.

I've noticed this when was implementing https://github.com/ably/ably-cocoa/pull/1942 which had two places where this should be done. So I decided to fix duplication first.

┆Issue is synchronized with this Jira Task by Unito