Documentation

This commit is contained in:
Hocuri
2026-04-08 14:59:28 +02:00
parent e1f7af6db5
commit 5191a92b8f
3 changed files with 12 additions and 5 deletions

View File

@@ -686,6 +686,13 @@ impl CommandApi {
/// or manually updating the value to avoid getting already
/// processed messages.
///
/// DEPRECATED 2026-04: This returns the message's id as soon as the first part arrives,
/// even if it is not fully downloaded yet.
/// The bot needs to wait for the message to be fully downloaded.
/// Since this is usually not the desired behavior,
/// bots should instead use the #DC_EVENT_INCOMING_MSG / [`types::events::EventType::IncomingMsg`]
/// event for getting notified about new messages.
///
/// [`markseen_msgs`]: Self::markseen_msgs
async fn get_next_msgs(&self, account_id: u32) -> Result<Vec<u32>> {
let ctx = self.get_context(account_id).await?;

View File

@@ -1147,10 +1147,11 @@ ORDER BY m.timestamp DESC,m.id DESC",
/// Blocked contacts and chats are excluded,
/// but self-sent messages and contact requests are included in the results.
///
/// Note that this returns the pre-message's id as soon as it arrives.
/// The bot needs to wait for the post-message by itself if it wants to use this API
/// to get fully downloaded messages.
/// If the bot doesn't want this, then it should instead use the [`EventType::IncomingMsg`]
/// DEPRECATED 2026-04: This returns the message's id as soon as the first part arrives,
/// even if it is not fully downloaded yet.
/// The bot needs to wait for the message to be fully downloaded.
/// Since this is usually not the desired behavior,
/// bots should instead use the [`EventType::IncomingMsg`]
/// event for getting notified about new messages.
pub async fn get_next_msgs(&self) -> Result<Vec<MsgId>> {
let last_msg_id = match self.get_config(Config::LastMsgId).await? {

View File

@@ -1305,7 +1305,6 @@ async fn decide_chat_assignment(
}
);
pre_message_exists
// TODO send incoming msg event
} else if let PreMessageMode::Pre {
post_msg_rfc724_mid,
..