Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDafydd Harries <dafydd.harries@collabora.co.uk>2007-11-19 22:53:35 (GMT)
committer Dafydd Harries <dafydd.harries@collabora.co.uk>2007-11-19 22:53:35 (GMT)
commit4c8e8b71b53bd8bfc3a081a196558f1cef46e7b5 (patch)
tree47c08d7cad99f822fc82ce74224fa009d9a83fc9
parentc5bb3dc8ae8a098013dae610fbc08230454a64af (diff)
apply patch by Guillaume so that subscribe/presence channel tracking is not dependent on which order they appear in
-rw-r--r--src/server_plugin.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/server_plugin.py b/src/server_plugin.py
index 84e93f2..834eedc 100644
--- a/src/server_plugin.py
+++ b/src/server_plugin.py
@@ -286,10 +286,23 @@ class ServerPlugin(TelepathyPlugin):
self._publish_channel[CHANNEL_INTERFACE_GROUP].AddMembers(
local_pending, '')
+ self._add_not_subscribed_to_subscribe_channel()
+
+ def _subscribe_channel_cb(self, channel):
+ TelepathyPlugin._subscribe_channel_cb(self, channel)
+
+ self._add_not_subscribed_to_subscribe_channel()
+
+ def _add_not_subscribed_to_subscribe_channel(self):
+ if self._publish_channel is None or self._subscribe_channel is None:
+ return
+
+ publish_handles, local_pending, remote_pending = \
+ self._publish_channel[CHANNEL_INTERFACE_GROUP].GetAllMembers()
+
# request subscriptions from people subscribed to us if we're
# not subscribed to them
not_subscribed = set(publish_handles)
not_subscribed -= self._subscribe_members
self._subscribe_channel[CHANNEL_INTERFACE_GROUP].AddMembers(
not_subscribed, '')
-