comparison src/plugins/plugin_tickets_import.py @ 2437:91bbad17fd53

plugins blog import, tickets import, XEP-0277: fixed call to getCommentsService (it is now returning a Deferred)
author Goffi <goffi@goffi.org>
date Thu, 16 Nov 2017 07:31:00 +0100
parents 8b37a62336c3
children 544c4d2fec45
comparison
equal deleted inserted replaced
2436:b52e78cc86ed 2437:91bbad17fd53
121 def importSubItems(self, client, item_import_data, ticket_data, session, options): 121 def importSubItems(self, client, item_import_data, ticket_data, session, options):
122 # TODO: force "open" permission (except if private, check below) 122 # TODO: force "open" permission (except if private, check below)
123 # TODO: handle "private" metadata, to have non public access for node 123 # TODO: handle "private" metadata, to have non public access for node
124 # TODO: node access/publish model should be customisable 124 # TODO: node access/publish model should be customisable
125 comments = ticket_data.get('comments', []) 125 comments = ticket_data.get('comments', [])
126 service, node = self._m.getCommentsService(client), self._m.getCommentsNode(session['root_node'] + u'_' + ticket_data['id']) 126 service = yield self._m.getCommentsService(client)
127 node = self._m.getCommentsNode(session['root_node'] + u'_' + ticket_data['id'])
127 node_options = {self._p.OPT_ACCESS_MODEL: self._p.ACCESS_OPEN, 128 node_options = {self._p.OPT_ACCESS_MODEL: self._p.ACCESS_OPEN,
128 self._p.OPT_PERSIST_ITEMS: 1, 129 self._p.OPT_PERSIST_ITEMS: 1,
129 self._p.OPT_MAX_ITEMS: -1, 130 self._p.OPT_MAX_ITEMS: -1,
130 self._p.OPT_DELIVER_PAYLOADS: 1, 131 self._p.OPT_DELIVER_PAYLOADS: 1,
131 self._p.OPT_SEND_ITEM_SUBSCRIBE: 1, 132 self._p.OPT_SEND_ITEM_SUBSCRIBE: 1,