Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TokenRequest: timestamp is integer in PHPDoc, string at runtime, Flutter expects int #99

Closed
alexeyinkin opened this issue Mar 29, 2021 · 3 comments · Fixed by #100
Closed
Assignees

Comments

@alexeyinkin
Copy link

alexeyinkin commented Mar 29, 2021

In TokenRequest class, $timestamp field is marked as integer in PHPDoc but is set a string in

$tokenRequest->timestamp = sprintf ( "%.0f", $this->ably->time() );

and in a few locations below that.

When I serialize the whole thing and send it to my client app in Flutter, it breaks trying to cast it to int here:
https://github.com/ably/ably-flutter/blob/e6a55d0e6691c32e049486a9abee8d0f766dbddd/lib/src/spec/common.dart#L361

Either you should make one type in both places, or in Flutter there must be parsing instead of casting.

┆Issue is synchronized with this Jira Uncategorised by Unito

@QuintinWillison
Copy link
Contributor

Thanks for the report, @alexeyinkin ... we'll take a look and get back to you here.

@alexeyinkin
Copy link
Author

This is still not in stable as the latest release is 1.1.4 on March 10. Any plans on release?

@QuintinWillison
Copy link
Contributor

Hello @alexeyinkin - sorry about that, I see we have a bit of overlooked work that's yet to be released for this SDK. I'm going to get that sorted, hopefully in the next few days. Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants