25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

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

View File

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