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

Pub/Sub can only publish JS truthy values #228

Closed
akiroz opened this issue May 31, 2017 · 1 comment
Closed

Pub/Sub can only publish JS truthy values #228

akiroz opened this issue May 31, 2017 · 1 comment
Assignees
Labels

Comments

@akiroz
Copy link
Contributor

akiroz commented May 31, 2017

Pub/Sub can only publish JS truthy values

  • Skygear SDK Date/Version: 0.23.0

Expected Results

EITHER pubsub accept any serializable JS value
OR pubsub message requires a single Object/Array as per the JSON spec

Actual Results

skygear.pubsub.publish will throw an exception if the message body is JS falsey.
i.e. 42, "hello", [] and {} works but 0, "", and null does not.

@Steven-Chan
Copy link

@rickmak I suggest restricting the pubsub message to JSON object/dictionary only to make it consistent across all SDK.

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

No branches or pull requests

3 participants