diff options
author | Simon 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) |
commit | f92f197661928a5e908616ddb48531944ff348ba (patch) | |
tree | 074f20da6d3b9f6b20623ccb5fc2780baa8dc756 /src | |
parent | acc3c307cfda5d34f238f473ee931705d3617732 (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.
Diffstat (limited to 'src')
-rw-r--r-- | src/activity.py | 10 | ||||
-rw-r--r-- | src/presenceservice.py | 4 |
2 files changed, 8 insertions, 6 deletions
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 |