Skip to content

Commit

Permalink
Added reentering local members to already attached channel if `resume…
Browse files Browse the repository at this point in the history
…` is false (ably-go/java implementation).
  • Loading branch information
maratal committed Feb 3, 2024
1 parent d1691e6 commit 4109483
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/ARTRealtimeChannel.m
Original file line number Diff line number Diff line change
Expand Up @@ -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]; // RTP17f, see https://github.com/ably/ably-cocoa/pull/1714/files#r1423868598 thread
}
return;
}
Expand All @@ -767,7 +768,7 @@ - (void)setAttached:(ARTProtocolMessage *)message {
[_attachedEventEmitter emit:nil with:nil];

[self.presence sendPendingPresence];
[self.presenceMap reenterLocalMembers]; // RTP17f, RTP17g
[self.presenceMap reenterLocalMembers]; // RTP17f
}

- (void)setDetached:(ARTProtocolMessage *)message {
Expand Down

0 comments on commit 4109483

Please sign in to comment.