[Dicson] don't flood with geoloc info if only timestamp changes. Fixes #5728
This commit is contained in:
parent
3fd9a0a282
commit
8a1305c082
1 changed files with 7 additions and 0 deletions
|
@ -127,6 +127,13 @@ class LocationListener:
|
||||||
continue
|
continue
|
||||||
if self.location_info == self._data:
|
if self.location_info == self._data:
|
||||||
continue
|
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)
|
gajim.connections[acct].send_location(self._data)
|
||||||
self.location_info = self._data.copy()
|
self.location_info = self._data.copy()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue