comparison src/twisted/plugins/pubsub.py @ 375:9a787881b824

implemented Order-By ProtoXEP (MAM + PubSub)
author Goffi <goffi@goffi.org>
date Sun, 06 Jan 2019 17:29:50 +0100
parents dabee42494ac
children e81964db3cd6
comparison
equal deleted inserted replaced
374:40e5edd7ea11 375:9a787881b824
67 from wokkel import mam 67 from wokkel import mam
68 from zope.interface import implements 68 from zope.interface import implements
69 69
70 from sat_pubsub import const 70 from sat_pubsub import const
71 from sat_pubsub import mam as pubsub_mam 71 from sat_pubsub import mam as pubsub_mam
72 from sat_pubsub.backend import BackendService 72 from sat_pubsub.backend import BackendService, ExtraDiscoHandler
73 from sat_pubsub.schema import SchemaHandler 73 from sat_pubsub.schema import SchemaHandler
74 from sat_pubsub.privilege import PrivilegesHandler 74 from sat_pubsub.privilege import PrivilegesHandler
75 from sat_pubsub.delegation import DelegationsHandler 75 from sat_pubsub.delegation import DelegationsHandler
76 from os.path import expanduser, realpath 76 from os.path import expanduser, realpath
77 import ConfigParser 77 import ConfigParser
229 mam_s.setHandlerParent(cs) 229 mam_s.setHandlerParent(cs)
230 230
231 sh = SchemaHandler() 231 sh = SchemaHandler()
232 sh.setHandlerParent(cs) 232 sh.setHandlerParent(cs)
233 233
234 # wokkel.pubsub doesn't handle non pubsub# disco
235 # and we need to announce other feature, so this is a workaround
236 # to add them
237 # FIXME: propose a patch upstream to fix this situation
238 ed = ExtraDiscoHandler()
239 ed.setHandlerParent(cs)
240
234 # XXX: delegation must be instancied at the end, 241 # XXX: delegation must be instancied at the end,
235 # because it does some MonkeyPatching on handlers 242 # because it does some MonkeyPatching on handlers
236 dh = DelegationsHandler() 243 dh = DelegationsHandler()
237 dh.setHandlerParent(cs) 244 dh.setHandlerParent(cs)
238 bs.delegation = dh 245 bs.delegation = dh