see e.g.
|
internal extension PresenceMessage { |
|
init(ablyCocoaPresenceMessage: ARTPresenceMessage) { |
|
clientId = ablyCocoaPresenceMessage.clientId |
|
timestamp = ablyCocoaPresenceMessage.timestamp |
|
action = ablyCocoaPresenceMessage.action |
|
if let ablyCocoaData = ablyCocoaPresenceMessage.data { |
|
data = JSONValue(ablyCocoaData: ablyCocoaData).objectValue |
|
} |
|
if let ablyCocoaExtras = ablyCocoaPresenceMessage.extras { |
|
extras = JSONValue.objectFromAblyCocoaExtras(ablyCocoaExtras) |
|
} |
|
} |
|
} |
— what if the ably-cocoa message contains something else (e.g. Data, or something else that came over the wire that it couldn't decode, as represented by encoding?); we don't want to crash
┆Issue is synchronized with this Jira Task by Unito
see e.g.
ably-chat-swift/Sources/AblyChat/AblyCocoaExtensions/InternalAblyCocoaTypes.swift
Lines 456 to 468 in 6be8bc6
— what if the ably-cocoa message contains something else (e.g.
Data, or something else that came over the wire that it couldn't decode, as represented byencoding?); we don't want to crash┆Issue is synchronized with this Jira Task by Unito