diff --git a/backend/canisters/local_user_index/CHANGELOG.md b/backend/canisters/local_user_index/CHANGELOG.md index 5ac4230f11..58608c038d 100644 --- a/backend/canisters/local_user_index/CHANGELOG.md +++ b/backend/canisters/local_user_index/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [unreleased] +### Changed + +- Change bot cmd number param values from u16 to f64 ([#7095](https://github.com/open-chat-labs/open-chat/pull/7095)) + ## [[2.0.1530](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1530-local_user_index)] - 2024-12-19 ### Added diff --git a/backend/canisters/user_index/CHANGELOG.md b/backend/canisters/user_index/CHANGELOG.md index 885de9b491..a108ea5145 100644 --- a/backend/canisters/user_index/CHANGELOG.md +++ b/backend/canisters/user_index/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Handle retry attempts when adding a new LocalUserIndex ([#7091](https://github.com/open-chat-labs/open-chat/pull/7091)) - Add logging + skip steps that have already been completed ([#7093](https://github.com/open-chat-labs/open-chat/pull/7093)) +- Change bot cmd number param values from u16 to f64 ([#7095](https://github.com/open-chat-labs/open-chat/pull/7095)) ## [[2.0.1533](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1533-user_index)] - 2024-12-19 diff --git a/backend/libraries/types/can.did b/backend/libraries/types/can.did index 5d1a7090f2..9f30d52b57 100644 --- a/backend/libraries/types/can.did +++ b/backend/libraries/types/can.did @@ -2117,14 +2117,14 @@ type StringParamChoice = record { }; type NumberParam = record { - min_length : nat16; - max_length : nat16; + min_value : float64; + max_value : float64; choices : vec NumberParamChoice; }; type NumberParamChoice = record { name : text; - value : nat16; + value : float64; }; type SlashCommandPermissions = record { diff --git a/backend/libraries/types/src/bots.rs b/backend/libraries/types/src/bots.rs index 07043eb75a..f24eeee9a8 100644 --- a/backend/libraries/types/src/bots.rs +++ b/backend/libraries/types/src/bots.rs @@ -50,10 +50,10 @@ pub struct StringParam { #[ts_export] #[derive(CandidType, Serialize, Deserialize, Debug, Clone)] pub struct NumberParam { - pub min_length: u16, - pub max_length: u16, - #[ts(as = "Vec")] - pub choices: Vec>, + pub min_value: f64, + pub max_value: f64, + #[ts(as = "Vec")] + pub choices: Vec>, } #[ts_export] @@ -104,7 +104,7 @@ macro_rules! slash_command_option_choice { } slash_command_option_choice!(SlashCommandOptionChoiceString, String); -slash_command_option_choice!(SlashCommandOptionChoiceU16, u16); +slash_command_option_choice!(SlashCommandOptionChoiceF64, f64); #[ts_export] #[derive(CandidType, Serialize, Deserialize, Debug)]