From 0c8a87df752726cae0dff3f55dc9db3f9a9e36fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9=20=D0=A1=D0=B0?= =?UTF-8?q?=D0=B1=D0=B8=D0=BB=D0=B8=D0=BD?= Date: Sun, 19 Jul 2026 20:37:46 +0300 Subject: [PATCH] fix: parse confirmation timeout on calendar PUT Map auto/manual/{timeout:N} in convert_field so client updates are not silently dropped. --- src/handlers/handler_calendar_by_id.erl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/handlers/handler_calendar_by_id.erl b/src/handlers/handler_calendar_by_id.erl index 009623c..fdcec73 100644 --- a/src/handlers/handler_calendar_by_id.erl +++ b/src/handlers/handler_calendar_by_id.erl @@ -181,6 +181,10 @@ convert_calendar_fields(Updates) -> convert_field({<<"title">>, Val}) -> {title, Val}; convert_field({<<"description">>, Val}) -> {description, 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({<<"tags">>, Val}) -> {tags, Val}; convert_field(Other) -> Other. \ No newline at end of file