From 5994591421d39d7cd70aa9709afd8d01ad854eb3 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 11 Jun 2007 21:45:40 +0000 Subject: activity, presenceservice: add more debug when joining rooms --- diff --git a/src/activity.py b/src/activity.py index 11629d6..b9a1973 100644 --- a/src/activity.py +++ b/src/activity.py @@ -430,7 +430,12 @@ class Activity(ExportedGObject): This method is called by the PresenceService on the local machine. """ - if not self._joined: + if self._joined: + _logger.debug("Ignoring alleged join to activity %s that I'm in: " + "I can already see who's there", self._id) + else: + _logger.debug("%s says they joined activity %s that I'm not in", + buddy.props.objid, self._id) self._add_buddies((buddy,)) def _add_buddies(self, buddies): diff --git a/src/presenceservice.py b/src/presenceservice.py index bf24b5e..69c6a2f 100644 --- a/src/presenceservice.py +++ b/src/presenceservice.py @@ -365,18 +365,23 @@ class PresenceService(ExportedGObject): for act in activities_joined: room_handle = activities[act] - _logger.debug("Handle %s joined activity %s", contact_handle, act) + _logger.debug("Handle %s claims to have joined activity %s", + contact_handle, act) activity = self._activities_by_id.get(act) if activity is None: # new activity, can fail + _logger.debug('No activity object for %s, creating one', act) activity = self._new_activity(act, tp, room_handle) - if activity is not None: + if activity is None: + _logger.debug('Failed to create activity object for %s', act) + else: activity.buddy_apparently_joined(buddy) activities_left = old_activities - new_activities for act in activities_left: - _logger.debug("Handle %s left activity %s", contact_handle, act) + _logger.debug("Handle %s claims to have left activity %s", + contact_handle, act) activity = self._activities_by_id.get(act) if activity is None: # don't bother creating an Activity just so someone can leave -- cgit v0.9.1