diff options
author | mathieui <mathieui@mathieui.net> | 2021-03-08 21:10:20 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-03-08 21:10:20 +0100 |
commit | e97f5ccb9cc8fcab342f706c1b99194b9968e09f (patch) | |
tree | 277b18260e121f22de44fb7e8251317a88ee9b1b /slixmpp | |
parent | cb83ebe32c12b4ccf36753e8f19f4b5d514ae00e (diff) | |
parent | 432a3326362775b171ceb3466cb7fb28312e4798 (diff) | |
download | slixmpp-e97f5ccb9cc8fcab342f706c1b99194b9968e09f.tar.gz slixmpp-e97f5ccb9cc8fcab342f706c1b99194b9968e09f.tar.bz2 slixmpp-e97f5ccb9cc8fcab342f706c1b99194b9968e09f.tar.xz slixmpp-e97f5ccb9cc8fcab342f706c1b99194b9968e09f.zip |
Merge branch 'fix-0004-field-type' into 'master'
Fix 0004 field type
See merge request poezio/slixmpp!148
Diffstat (limited to 'slixmpp')
-rw-r--r-- | slixmpp/plugins/xep_0004/stanza/form.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/slixmpp/plugins/xep_0004/stanza/form.py b/slixmpp/plugins/xep_0004/stanza/form.py index 84c89173..c04193f0 100644 --- a/slixmpp/plugins/xep_0004/stanza/form.py +++ b/slixmpp/plugins/xep_0004/stanza/form.py @@ -48,7 +48,8 @@ class Form(ElementBase): fields = self.get_fields() for var in fields: field = fields[var] - del field['type'] + if field['type'] != 'hidden': + del field['type'] del field['label'] del field['desc'] del field['required'] @@ -74,7 +75,8 @@ class Form(ElementBase): for option in options: field.add_option(**option) else: - del field['type'] + if field['type'] != 'hidden': + del field['type'] self.append(field) return field |