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

Other's alerts should populate map if within area #2

Open
tgreco opened this issue Jul 14, 2021 · 3 comments
Open

Other's alerts should populate map if within area #2

tgreco opened this issue Jul 14, 2021 · 3 comments
Labels

Comments

@tgreco
Copy link
Collaborator

tgreco commented Jul 14, 2021

  1. When an alert is created and is within a user's radius, the alert info needs to be sent via notification (which already works)
    but also via web socket so the alert can be added to the map immediately. There appears to be logic in palce for the web socket part,
    but it does not seem to get triggered. Can you verify the web socket portion works to send data under this condition.
@tgreco
Copy link
Collaborator Author

tgreco commented Jul 14, 2021

Screen.Recording.2021-07-13.at.8.07.17.PM.mov

@michaelklem this appears to be working on my end.
It doesn't appear to be setup to use any configuration to make sure I'm within a certain area of the geofence alert. But it does correctly populate the map for me.

Should I proceed with making this use a configuration that specifies how close a user should be to receive the alert?

@tgreco tgreco added the question Further information is requested label Jul 14, 2021
@michaelklem
Copy link
Owner

michaelklem commented Jul 14, 2021 via email

@tgreco
Copy link
Collaborator Author

tgreco commented Jul 14, 2021

This is complete now.
357ac03

You will need to merge the backend changes to main branch as I committed them on master out of habit.
https://github.com/michaelklem/alertwalker_backend/pull/new/master

The value for how close a user must be is stored in the configuration "MAP_DISPLAY_ALERT_RADIUS".

When location/map and location/geofence are called I now store the user's location in the user collection under the field "lastLocation".

Then when the backend is looking for nearby users to send the websocket message to it will filter on user.lastLocation.

I have only added this to the alertwalker-dev database.
Should I add this to the other databases as well?

@tgreco tgreco added resolved and removed question Further information is requested labels Jul 14, 2021
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

2 participants