comparison sat/plugins/plugin_xep_0363.py @ 3294:6505e5cc6ab9

plugin XEP-0363: register namespace
author Goffi <goffi@goffi.org>
date Tue, 09 Jun 2020 05:59:14 +0200
parents f5a5aa9fa73a
children 506fa3d91d3a
comparison
equal deleted inserted replaced
3293:f5a5aa9fa73a 3294:6505e5cc6ab9
100 host.plugins["UPLOAD"].register( 100 host.plugins["UPLOAD"].register(
101 "HTTP Upload", self.getHTTPUploadEntity, self.fileHTTPUpload 101 "HTTP Upload", self.getHTTPUploadEntity, self.fileHTTPUpload
102 ) 102 )
103 # list of callbacks used when a request is done to a component 103 # list of callbacks used when a request is done to a component
104 self.handlers = [] 104 self.handlers = []
105 # XXX: there is not yet official short name, so we use "http_upload"
106 host.registerNamespace("http_upload", NS_HTTP_UPLOAD)
105 107
106 def getHandler(self, client): 108 def getHandler(self, client):
107 return XEP_0363_handler(self) 109 return XEP_0363_handler(self)
108 110
109 def registerHandler(self, callback, priority=0): 111 def registerHandler(self, callback, priority=0):