fix: ensure limit is always at least 1 when sent to database

This commit is contained in:
Paul Makles
2025-02-10 17:51:22 +00:00
committed by Zomatree
parent e8cb0bb88a
commit 9a2a7901e7
2 changed files with 2 additions and 2 deletions

View File

@@ -282,7 +282,7 @@ auto_derived!(
pub struct OptionsQueryMessages {
/// Maximum number of messages to fetch
///
/// For fetching nearby messages, this is \`(limit + 1)\`.
/// For fetching nearby messages, this is \`(limit + 2)\`.
#[cfg_attr(feature = "validator", validate(range(min = 1, max = 100)))]
pub limit: Option<i64>,
/// Message id before which messages should be fetched