plugin blog import, XEP-0277: progress + redirect:

- progression is now handled
    - url redirections are handled with PubSub URIs, and returned as metadata with progressFinished
    - tmp_dir is cleaned in a finally close
This commit is contained in:
Goffi 2016-01-23 20:01:28 +01:00
commit 7fddbe943e

View file

@ -65,6 +65,7 @@ class NodeAccessChangeException(Exception):
class XEP_0277(object):
namespace = NS_MICROBLOG
def __init__(self, host):
log.info(_(u"Microblogging plugin initialization"))
@ -454,7 +455,7 @@ class XEP_0277(object):
## publish ##
def getCommentNode(self, item_id):
def getCommentsNode(self, item_id):
"""Generate comment node
@param item_id(unicode): id of the parent item
@ -462,7 +463,7 @@ class XEP_0277(object):
"""
return u"{}{}".format(NS_COMMENT_PREFIX, item_id)
def getCommentService(self, client, parent_service=None):
def getCommentsService(self, client, parent_service=None):
"""Get prefered PubSub service to create comment node
@param pubsub_service(jid.JID, None): PubSub service of the parent item