Commit 8a1305c0 authored by Yann Leboulanger's avatar Yann Leboulanger

[Dicson] don't flood with geoloc info if only timestamp changes. Fixes #5728

parent 3fd9a0a2
......@@ -127,6 +127,13 @@ class LocationListener:
continue
if self.location_info == self._data:
continue
if 'timestamp' in self.location_info and 'timestamp' in self._data:
last_data = self.location_info.copy()
del last_data['timestamp']
new_data = self._data.copy()
del new_data['timestamp']
if last_data == new_data:
continue
gajim.connections[acct].send_location(self._data)
self.location_info = self._data.copy()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment