mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Documentation
This commit is contained in:
@@ -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?;
|
||||
|
||||
@@ -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? {
|
||||
|
||||
@@ -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,
|
||||
..
|
||||
|
||||
Reference in New Issue
Block a user