diff options
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | src/buddy.py | 11 |
2 files changed, 10 insertions, 5 deletions
@@ -1,4 +1,6 @@ -* #2299: Be sure buddies keys are converted to string +* #3327: don't let a slower connection manager delete current activity + advertised by a faster one (smcv) +* #2299: Be sure buddies keys are converted to string (cassidy) * #3291: Further improve activity participant tracking (smcv) * Correctly pick up existing Salut connections (smcv) * Don't crash if a buddy property is None (smcv) diff --git a/src/buddy.py b/src/buddy.py index 679138a..0ea23e7 100644 --- a/src/buddy.py +++ b/src/buddy.py @@ -192,6 +192,7 @@ class Buddy(ExportedGObject): self._key = None self._icon = '' self._current_activity = None + self._current_activity_plugin = None self._nick = None self._color = None self._ip4_address = None @@ -590,7 +591,12 @@ class Buddy(ExportedGObject): def update_current_activity(self, tp, current_activity): """Update the current activity from the given Telepathy connection. """ - self.set_properties({_PROP_CURACT: current_activity}) + # don't allow an absent current-activity to overwrite a present one + # unless our current current-activity was advertised by the same + # Telepathy connection + if current_activity or self._current_activity_plugin is tp: + self._current_activity_plugin = tp + self.set_properties({_PROP_CURACT: current_activity}) def update_avatar(self, tp, new_avatar_token, icon=None, mime_type=None): """Handle update of the avatar""" @@ -714,9 +720,6 @@ class GenericOwner(Buddy): if cur_activity_handle is None: # don't advertise a current activity that's not shared on # this connection - # FIXME: this gives us a different current activity on each - # connection - need to make sure clients are OK with this - # (at the moment, PS isn't!) cur_activity = "" cur_activity_handle = 0 |