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

Broken hook data #143

Closed
mkabischev opened this issue Feb 8, 2017 · 2 comments
Closed

Broken hook data #143

mkabischev opened this issue Feb 8, 2017 · 2 comments

Comments

@mkabischev
Copy link
Contributor

When we set initial coordinates for some object and these coordinates belongs to subscribed region data for inside hook is broken.

Steps to reproduce.

  1. In first terminal
127.0.0.1:9851> nearby fleet FENCE point 33.5123 -112.2693 600
{"ok":true,"live":true}
  1. In second terminal
127.0.0.1:9851> set fleet truck1 point 33.5123 -112.2693
{"ok":true,"elapsed":"68.993µs"}

Then in first terminal:

{"command":"set","group":"589af129375e4f2747a798ac","detect":"enter","key":"fleet","time":"2017-02-08T13:21:29.288927204+03:00","id":"truck1","object":{"type":"Point","coordinates":[-112.2693,33.5123]}}
{"command":"set","group":"589af129375e4f2747a798ac","detect":"inside","key":"fleet","time":"2017-02-08T13:21:29.288927204+03:00","command":"set","group":"589af129375e4f2747a798ac","detect":"enter","key":"fleet","time":"2017-02-08T13:21:29.288927204+03:00","id":"truck1","object":{"type":"Point","coordinates":[-112.2693,33.5123]}}

Second hook contains duplicated keys from first hook: command, group, detect.

@mkabischev
Copy link
Contributor Author

Fix is simple, I`ll create PR in few minutes.

@tidwall tidwall closed this as completed in 237d4b2 Feb 9, 2017
@tidwall
Copy link
Owner

tidwall commented Feb 9, 2017

Thanks a ton for the fix!

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

No branches or pull requests

2 participants