plugin list of interest: expose interestsRegisterFileSharing to bridge + use coroutines
This commit is contained in:
parent
47edb01bd3
commit
9f9a6a5a2b
1 changed files with 33 additions and 8 deletions
|
|
@ -21,6 +21,7 @@ from sat.core.i18n import _
|
|||
from sat.core.constants import Const as C
|
||||
from sat.core.log import getLogger
|
||||
from sat.tools.common import data_format
|
||||
from twisted.internet import defer
|
||||
from twisted.words.protocols.jabber import jid
|
||||
|
||||
log = getLogger(__name__)
|
||||
|
|
@ -70,7 +71,7 @@ class FileSharingInvitation(object):
|
|||
if repos_type == "files":
|
||||
type_human = _("file sharing")
|
||||
elif repos_type == "photos":
|
||||
type_human = _("photos album")
|
||||
type_human = _("photo album")
|
||||
else:
|
||||
log.warning("Unknown repository type: {repos_type}".format(
|
||||
repos_type=repos_type))
|
||||
|
|
@ -81,5 +82,8 @@ class FileSharingInvitation(object):
|
|||
'with namespace "{namespace}" at path [{path}]').format(
|
||||
profile=client.profile, type_human=type_human, namespace=namespace, path=path)
|
||||
)
|
||||
return self.host.plugins['LIST_INTEREST'].registerFileSharing(
|
||||
client, service, repos_type, namespace, path, name, extra)
|
||||
return defer.ensureDeferred(
|
||||
self.host.plugins['LIST_INTEREST'].registerFileSharing(
|
||||
client, service, repos_type, namespace, path, name, extra
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue