Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-09-11 15:12:21 (GMT)
committer Simon McVittie <simon.mcvittie@collabora.co.uk>2007-09-11 15:12:21 (GMT)
commit89ee8fd4ef51513fe236eead4c07a15be3059d51 (patch)
tree93ea2a4eb5d83844cd7e14c7fb4fe4afea34ace8
parentb4e66c9fef41c913b870ec523dab5c868f4b4d88 (diff)
Bug#3327: don't let a slower connection manager delete a current activity advertised by a faster one
-rw-r--r--NEWS2
-rw-r--r--src/buddy.py11
2 files changed, 9 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 5b33b1b..d6841bd 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+* #3327: don't let a slower connection manager delete current activity
+ advertised by a faster one (smcv)
* #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