Pubsub xdata fields max_item/item_expira/children_max use 'max' not 'infinity'

Codec in xmpp crashes when we use infinity (see issue #4011), so lets
convert those values before passing them to xmpp:encode(0
This commit is contained in:
Paweł Chmielowski 2023-03-21 15:30:36 +01:00
parent f953dc3f5e
commit 3c97775573
1 changed files with 4 additions and 0 deletions

View File

@ -3456,6 +3456,10 @@ get_configure_xfields(_Type, Options, Lang, Groups) ->
{true, {roster_groups_allowed, Value, Groups}};
({sql, _}) -> false;
({rsm, _}) -> false;
({Item, infinity}) when Item == max_items;
Item == item_expire;
Item == children_max ->
{true, {Item, max}};
(_) -> true
end, Options),
Lang).