SleekXMPP
SleekXMPP copied to clipboard
xep_0004 doesn’t allow a field of type="hidden" in Form.add_field
Adding a field of type="hidden" is impossible if the form is not of type "form" or "result".
But we need to do so with the forms we return in e.g. XEP-0133.
Of course, we can bypass that with field['type'] = 'hidden' after the form.add_field, but I think it would be better to remove the
else:
del field['type']
in xep_0004/stanza/form.py
@legastero does removing the else as mentioned seem ok?
https://github.com/fritzy/SleekXMPP/blob/develop/sleekxmpp/plugins/xep_0004/stanza/form.py#L78