diff --git a/lib/src/platform/src/realtime/connection.dart b/lib/src/platform/src/realtime/connection.dart index fe8ba4edd..d64d14b7f 100644 --- a/lib/src/platform/src/realtime/connection.dart +++ b/lib/src/platform/src/realtime/connection.dart @@ -37,8 +37,7 @@ class Connection extends PlatformObject { /// A unique public identifier for this connection, used to identify this /// member. - Future get id async => - invoke(PlatformMethod.connectionId); + Future get id => invoke(PlatformMethod.connectionId); /// A unique private connection key used to recover or resume a connection, /// assigned by Ably. @@ -49,15 +48,22 @@ class Connection extends PlatformObject { /// to publish on behalf of this client. See the /// [publishing over REST on behalf of a realtime client docs](https://ably.com/docs/rest/channels#publish-on-behalf) /// for more info. - Future get key async => - invoke(PlatformMethod.connectionKey); + Future get key => invoke(PlatformMethod.connectionKey); /// The recovery key string can be used by another client to recover this /// connection's state in the recover client options property. /// /// See [connection state recover options](https://ably.com/docs/realtime/connection#connection-state-recover-options) + /// for more information.\ + @Deprecated('Use createRecoveryKey instead') + Future get recoveryKey => createRecoveryKey(); + + /// The createRecoveryKey returns key string can be used by another client to + /// recover this connection's state in the recover client options property. + /// + /// See [connection state recover options](https://ably.com/docs/realtime/connection#connection-state-recover-options) /// for more information. - Future get recoveryKey async => + Future createRecoveryKey() => invoke(PlatformMethod.connectionRecoveryKey); /// The serial number of the last message to be received on this connection,