You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to reproduce
Using JSClient provide user or timestamp as integers What Happens
Providing user or timestamp as integers causes following errors in client.HandleCmd respectively
json: cannot unmarshal number into Go value of type libcentrifugo.UserID
json: cannot unmarshal number into Go value of type string
Solution
Probably implict type cast in Js Client (and other lang-libraries) is the best solution...
The text was updated successfully, but these errors were encountered:
Hello! User ID can be a non number, for example MongoDB object id, so explicitly providing string as it happens now seems to be a right way.
I also don't think that we need to typecast timestamp because lots of libraries in languages return timestamp with microseconds while we need only seconds. The result of type cast can be even more non obvious. I think providing utility functions like the one from centrifuge-go is a better way.
How to reproduce
Using JSClient provide user or timestamp as integers
What Happens
Providing user or timestamp as integers causes following errors in client.HandleCmd respectively
Solution
Probably implict type cast in Js Client (and other lang-libraries) is the best solution...
The text was updated successfully, but these errors were encountered: