mirror of
https://github.com/chatmail/core.git
synced 2026-04-05 15:02:11 +03:00
docs: Why search_msgs() only looks at the first kilobytes of long messages
This commit is contained in:
@@ -1267,6 +1267,12 @@ impl Context {
|
||||
///
|
||||
/// If `chat_id` is provided this searches only for messages in this chat, if `chat_id`
|
||||
/// is `None` this searches messages from all chats.
|
||||
///
|
||||
/// NB: Wrt the search in long messages which are shown truncated with the "Show Full Message…"
|
||||
/// button, we only look at the first several kilobytes. Let's not fix this -- one can send a
|
||||
/// dictionary in the message that matches any reasonable search request, but the user won't see
|
||||
/// the match because they should tap on "Show Full Message…" for that. Probably such messages
|
||||
/// would only clutter search results.
|
||||
pub async fn search_msgs(&self, chat_id: Option<ChatId>, query: &str) -> Result<Vec<MsgId>> {
|
||||
let real_query = query.trim().to_lowercase();
|
||||
if real_query.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user