fix: parse confirmation timeout on calendar PUT
Map auto/manual/{timeout:N} in convert_field so client updates are not silently dropped.
This commit is contained in:
@@ -181,6 +181,10 @@ convert_calendar_fields(Updates) ->
|
|||||||
convert_field({<<"title">>, Val}) -> {title, Val};
|
convert_field({<<"title">>, Val}) -> {title, Val};
|
||||||
convert_field({<<"description">>, Val}) -> {description, Val};
|
convert_field({<<"description">>, Val}) -> {description, Val};
|
||||||
convert_field({<<"type">>, Val}) -> {type, Val};
|
convert_field({<<"type">>, Val}) -> {type, Val};
|
||||||
|
convert_field({<<"confirmation">>, <<"auto">>}) -> {confirmation, auto};
|
||||||
|
convert_field({<<"confirmation">>, <<"manual">>}) -> {confirmation, manual};
|
||||||
|
convert_field({<<"confirmation">>, #{<<"timeout">> := N}}) when is_integer(N), N > 0 ->
|
||||||
|
{confirmation, {timeout, N}};
|
||||||
convert_field({<<"confirmation">>, Val}) -> {confirmation, Val};
|
convert_field({<<"confirmation">>, Val}) -> {confirmation, Val};
|
||||||
convert_field({<<"tags">>, Val}) -> {tags, Val};
|
convert_field({<<"tags">>, Val}) -> {tags, Val};
|
||||||
convert_field(Other) -> Other.
|
convert_field(Other) -> Other.
|
||||||
Reference in New Issue
Block a user