Commit 1e1ced9a authored by Philipp Hörist's avatar Philipp Hörist

Fix detection of httpupload max-file-size

parent 20301d36
......@@ -83,12 +83,13 @@ def pass_disco(self, info):'Discovered component: %s', info.jid)
for form in info.dataforms:
form_dict = form.asDict()
if form_dict.get('FORM_TYPE') != self.httpupload_namespace:
form_type = form.vars.get('FORM_TYPE')
if (form_type is None or
form_type.value != self.httpupload_namespace):
size = form_dict.get('max-file-size')
size = form.vars.get('max-file-size')
if size is not None:
self.max_file_size = int(size)
self.max_file_size = int(size.value)
if self.max_file_size is None:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment