ably / ably-ruby

Ruby client library SDK for Ably realtime messaging service
https://ably.com/download
Apache License 2.0
37 stars 19 forks source link

Implement presence re-entry requirement change for 1.1 #185

Closed paddybyers closed 2 years ago

paddybyers commented 5 years ago

See https://github.com/ably/docs/pull/711

Related: https://github.com/ably/ably-ruby/issues/163

Acceptance criteria: After confirming that the lib satisfies the new RTP17c, please update the spec spreadsheet accordingly

┆Issue is synchronized with this Jira Bug by Unito

ghost commented 2 years ago

This is implemented. Members are re-entry in two cases: in_sync state (RTP17c1) and sync_none (RTP17c2) In both situations the following method is responsible for automatic re-entry:

https://github.com/ably/ably-ruby/blob/d901e9687469381be422d481fa95972e063ce348/lib/ably/realtime/presence/members_map.rb#L270

RTP17c, RTP17c1 https://github.com/ably/ably-ruby/blob/main/lib/ably/realtime/presence/members_map.rb#L248 -> https://github.com/ably/ably-ruby/blob/main/lib/ably/realtime/presence/members_map.rb#L264

RTP17c, RTP17c2 https://github.com/ably/ably-ruby/blob/main/lib/ably/realtime/channel/channel_manager.rb#L39 -> https://github.com/ably/ably-ruby/blob/main/lib/ably/realtime/channel/channel_manager.rb#L260 -> https://github.com/ably/ably-ruby/blob/main/lib/ably/realtime/presence/presence_manager.rb#L58 -> https://github.com/ably/ably-ruby/blob/main/lib/ably/realtime/presence/members_map.rb#L238 -> https://github.com/ably/ably-ruby/blob/main/lib/ably/realtime/presence/members_map.rb#L244 -> https://github.com/ably/ably-ruby/blob/main/lib/ably/realtime/presence/members_map.rb#L248