julien-nc / phonetrack

Nextcloud app to create tracking sessions to display phones position in real time and export activity to gpx.
GNU Affero General Public License v3.0
47 stars 6 forks source link

Ignore messages from OwnTracks without lat/lon (control messages). #5

Closed mbirth closed 1 year ago

mbirth commented 1 year ago

OwnTracks control messages run into error which makes OwnTracks try again and again.

If you e.g. swipe-delete an entry from the Friends list in OwnTracks, it tries to send that event to the server. This message has no lat/lon info and thus PhoneTrack returns an error. This causes OwnTracks to queue the control messages to try again and all subsequent location messages go to the queue as well - halting location logging into PhoneTrack completely. (Because it can't get the control message to go through.)

This change just ignores these messages and returns HTTP 200 so OwnTracks continues pushing the rest of the queue.