SleekXMPP icon indicating copy to clipboard operation
SleekXMPP copied to clipboard

xep_0004 doesn’t allow a field of type="hidden" in Form.add_field

Open mathieui opened this issue 11 years ago • 1 comments

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

mathieui avatar Jun 30 '13 11:06 mathieui

@legastero does removing the else as mentioned seem ok?

https://github.com/fritzy/SleekXMPP/blob/develop/sleekxmpp/plugins/xep_0004/stanza/form.py#L78

bear avatar Apr 12 '15 01:04 bear