ARTPresenceMessage
Objective-C
@interface ARTPresenceMessage : ARTBaseMessage
Swift
class ARTPresenceMessage : ARTBaseMessage
Contains an individual presence update sent to, or received from, Ably.
-
The type of
ARTPresenceAction
theARTPresenceMessage
is for.Declaration
Objective-C
@property (nonatomic) ARTPresenceAction action;
Swift
var action: ARTPresenceAction { get set }
-
Combines
ARTBaseMessage.clientId
andARTBaseMessage.connectionId
to ensure that multiple connected clients with an identicalclientId
are uniquely identifiable.Declaration
Objective-C
- (nonnull NSString *)memberKey;
Swift
func memberKey() -> String
Return Value
A combination of
ARTBaseMessage.clientId
andARTBaseMessage.connectionId
. -
Returns whether this presenceMessage is synthesized, i.e. was not actually sent by the connection (usually means a leave event sent 15s after a disconnection). This is useful because synthesized messages cannot be compared for newness by id lexicographically - RTP2b1.
Declaration
Objective-C
- (BOOL)isSynthesized;
Swift
func isSynthesized() -> Bool
-
Undocumented
Declaration
Objective-C
- (NSArray<NSString *> *)parseId;
Swift
func parseId() -> [String]!
-
Undocumented
Declaration
Objective-C
- (NSInteger)msgSerialFromId;
Swift
func msgSerialFromId() -> Int
-
Undocumented
Declaration
Objective-C
- (NSInteger)indexFromId;
Swift
func indexFromId() -> Int