Skip to content

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

@alexeyinkin

Description

@alexeyinkin

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions