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-11-08 14:52:23 (GMT)
committer Simon McVittie <simon.mcvittie@collabora.co.uk>2007-11-08 14:52:23 (GMT)
commitf92f197661928a5e908616ddb48531944ff348ba (patch)
tree074f20da6d3b9f6b20623ccb5fc2780baa8dc756
parentacc3c307cfda5d34f238f473ee931705d3617732 (diff)
Don't put activity sharer in 'private' property (correcting a wrong part of the patch for #4585) (#4692)
Also clarify related code, and don't force the value of the 'private' property when we just join an activity.
-rw-r--r--NEWS3
-rw-r--r--src/activity.py10
-rw-r--r--src/presenceservice.py4
3 files changed, 11 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index e06a66f..1c583ac 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+* #4692: Don't put activity sharer in 'private' property (correcting a wrong
+ part of the patch for #4585) (smcv)
+
Snapshot 944c5280b4
* #4585: Watch activity unique names on D-Bus for disappearences, implying
diff --git a/src/activity.py b/src/activity.py
index 3165e65..6919af0 100644
--- a/src/activity.py
+++ b/src/activity.py
@@ -526,7 +526,7 @@ class Activity(ExportedGObject):
unsuccessful
"""
- self.join(async_cb, async_err_cb, False, sender)
+ self.join(async_cb, async_err_cb, False, sender=sender)
def _activity_unique_name_cb(self, owner):
if not owner:
@@ -917,7 +917,7 @@ class Activity(ExportedGObject):
reply_handler=self._join_activity_create_channel_cb,
error_handler=self._join_failed_cb)
- def join(self, async_cb, async_err_cb, sharing, private=True,
+ def join(self, async_cb, async_err_cb, sharing, private=None,
sender=None):
"""Local method for the local user to attempt to join the activity.
@@ -926,7 +926,8 @@ class Activity(ExportedGObject):
async_err_cb -- Callback method to be called with an Exception
parameter if join attempt is unsuccessful
sharing -- bool: True if sharing, False if joining
- private -- bool: True if by invitation, False if Advertising
+ private -- bool: None if we shouldn't change it, True if by
+ invitation, False if Advertising
The two callbacks are passed to the server_plugin ("tp") object,
which in turn passes them back as parameters in a callback to the
@@ -951,7 +952,8 @@ class Activity(ExportedGObject):
self._join_cb = async_cb
self._join_err_cb = async_err_cb
self._join_is_sharing = sharing
- self._private = private
+ if private is not None:
+ self._private = private
_logger.debug('%r: activity instance has unique name %s', self,
sender)
self._activity_unique_name = sender
diff --git a/src/presenceservice.py b/src/presenceservice.py
index 03a8aaf..20442de 100644
--- a/src/presenceservice.py
+++ b/src/presenceservice.py
@@ -790,8 +790,8 @@ class PresenceService(ExportedGObject):
self._activities_by_handle[tp][room] = activity
async_cb(activity.object_path())
- activity.join(activity_shared, async_err_cb, True, private,
- sender=sender)
+ activity.join(activity_shared, async_err_cb, sharing=True,
+ private=private, sender=sender)
# local activities are valid at creation by definition, but we can't
# connect to the activity's validity-changed signal until its already