diff --git a/Source/ARTRealtimeChannel.m b/Source/ARTRealtimeChannel.m index f03a5dfb9..b10841d74 100644 --- a/Source/ARTRealtimeChannel.m +++ b/Source/ARTRealtimeChannel.m @@ -753,6 +753,7 @@ - (void)setAttached:(ARTProtocolMessage *)message { } ARTChannelStateChange *stateChange = [[ARTChannelStateChange alloc] initWithCurrent:self.state_nosync previous:self.state_nosync event:ARTChannelEventUpdate reason:message.error resumed:message.resumed]; [self emit:stateChange.event with:stateChange]; + [self.presenceMap reenterLocalMembers]; // RTP17i } return; } @@ -767,7 +768,7 @@ - (void)setAttached:(ARTProtocolMessage *)message { [_attachedEventEmitter emit:nil with:nil]; [self.presence sendPendingPresence]; - [self.presenceMap reenterLocalMembers]; // RTP17f, RTP17g + [self.presenceMap reenterLocalMembers]; // RTP17i } - (void)setDetached:(ARTProtocolMessage *)message { diff --git a/Test/Tests/RealtimeClientPresenceTests.swift b/Test/Tests/RealtimeClientPresenceTests.swift index 21eef4f5d..babdcb87c 100644 --- a/Test/Tests/RealtimeClientPresenceTests.swift +++ b/Test/Tests/RealtimeClientPresenceTests.swift @@ -2872,7 +2872,7 @@ class RealtimeClientPresenceTests: XCTestCase { } } - // RTP17f, RTP17g + // RTP17i, RTP17g func test__200__Presence__PresenceMap_should_perform_re_entry_whenever_a_channel_moves_into_the_attached_state_and_presence_message_consists_of_enter_action_with_client_id_and_data() throws { let test = Test() let options = try AblyTests.commonAppSetup(for: test) @@ -2917,7 +2917,7 @@ class RealtimeClientPresenceTests: XCTestCase { expect(client.connection.state).toEventually(equal(ARTRealtimeConnectionState.connected), timeout: testTimeout) - // RTP17f + // RTP17i expect(channel.state).toEventually(equal(ARTRealtimeChannelState.attached), timeout: testTimeout) expect(channel.internal.presenceMap.localMembers).to(haveCount(2))