plugin groupblog: fixed initialisation
This commit is contained in:
parent
357374bcd2
commit
836d9100c5
1 changed files with 7 additions and 0 deletions
|
|
@ -125,12 +125,19 @@ class GroupBlog():
|
|||
debug(_('Looking for item-access power pubsub server'))
|
||||
#we don't have any pubsub server featuring item access yet
|
||||
client.item_access_pubsub = None
|
||||
client._item_access_pubsub_pending = defer.Deferred()
|
||||
for entity in self.host.memory.getServerServiceEntities("pubsub", "service", profile):
|
||||
_disco = yield client.disco.requestInfo(entity)
|
||||
#if set([NS_PUBSUB_ITEM_ACCESS, NS_PUBSUB_AUTO_CREATE, NS_PUBSUB_CREATOR_JID_CHECK]).issubset(_disco.features):
|
||||
if set([NS_PUBSUB_AUTO_CREATE, NS_PUBSUB_CREATOR_JID_CHECK]).issubset(_disco.features):
|
||||
info(_("item-access powered pubsub service found: [%s]") % entity.full())
|
||||
client.item_access_pubsub = entity
|
||||
client._item_access_pubsub_pending.callback(None)
|
||||
|
||||
if hasattr(client,"_item_access_pubsub_pending"):
|
||||
#XXX: we need to wait for item access pubsub service check
|
||||
ignore = yield client._item_access_pubsub_pending
|
||||
del client._item_access_pubsub_pending
|
||||
|
||||
if not client.item_access_pubsub:
|
||||
error(_("No item-access powered pubsub server found, can't use group blog"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue