plugin XEP-0277: checkFeatures implemented

This commit is contained in:
Goffi 2015-11-23 23:30:41 +01:00
commit 57176d1018

View file

@ -104,6 +104,17 @@ class XEP_0277(object):
host.bridge.addMethod("mbGetAtom", ".plugin", in_sign='ssiasa{ss}s', out_sign='s',
method=self._mbGetAtom, async=True)
def _checkFeaturesCb(self, available):
return {'available': C.BOOL_TRUE}
def _checkFeaturesEb(self, fail):
return {'available': C.BOOL_FALSE}
def getFeatures(self, profile):
d = self.host.checkFeatures([], identity=('pubsub', 'pep'), profile=profile)
d.addCallbacks(self._checkFeaturesCb, self._checkFeaturesEb)
return d
## plugin management methods ##
def _itemsReceived(self, itemsEvent, profile):