Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xdata] Only require list-multi and list-single fields to have a value #621

Conversation

Flowdalic
Copy link
Member

Only list-multi and list-single fields require at least one value when submitting a form. In other cases, for example XEP-0045's muc#roomconfig_roomadmins, which is of type jid-multi, is used without any values to reset the room's admins list.

Fixes SMACK-946.

Only list-multi and list-single fields require at least one value when
submitting a form. In other cases, for example XEP-0045's
muc#roomconfig_roomadmins, which is of type jid-multi, is used without
any values to reset the room's admins list.

Fixes SMACK-946.
@guusdk
Copy link
Member

guusdk commented Sep 2, 2024

This looks good to me.

I do wonder if we'll have XEPs that override the behavior that's being enforced now (with regards to the 'must have one item' restriction). If that were to exist, then this code might not be usable. I'm perfectly happy to cross that bridge if we get there.

@Flowdalic
Copy link
Member Author

I do wonder if we'll have XEPs that override the behavior that's being enforced now (with regards to the 'must have one item' restriction). If that were to exist, then this code might not be usable. I'm perfectly happy to cross that bridge if we get there.

That's what I am thinking as well.

Written on LH742

@guusdk
Copy link
Member

guusdk commented Sep 2, 2024

Can this be merged then?

@Flowdalic Flowdalic added this pull request to the merge queue Sep 2, 2024
Merged via the queue into igniterealtime:master with commit 38c6dd2 Sep 2, 2024
3 checks passed
@Flowdalic Flowdalic deleted the fillable-forms-only-require-list-fields-to-have-value-set branch September 2, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants