plugin XEP-0277: checkFeatures implemented
This commit is contained in:
parent
ba295f1429
commit
57176d1018
1 changed files with 11 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue