mirror of
https://github.com/chatmail/core.git
synced 2026-05-06 16:36:59 +03:00
add API to opt out of truncating long messages
This commit is contained in:
@@ -23,8 +23,9 @@ use deltachat::ephemeral::Timer;
|
||||
use deltachat::imex;
|
||||
use deltachat::location;
|
||||
use deltachat::message::{
|
||||
self, delete_msgs_ex, get_existing_msg_ids, get_msg_read_receipt_count, get_msg_read_receipts,
|
||||
markseen_msgs, Message, MessageState, MsgId, Viewtype,
|
||||
self, delete_msgs_ex, dont_truncate_long_messages, get_existing_msg_ids,
|
||||
get_msg_read_receipt_count, get_msg_read_receipts, markseen_msgs, Message, MessageState, MsgId,
|
||||
Viewtype,
|
||||
};
|
||||
use deltachat::peer_channels::{
|
||||
leave_webxdc_realtime, send_webxdc_realtime_advertisement, send_webxdc_realtime_data,
|
||||
@@ -1434,6 +1435,15 @@ impl CommandApi {
|
||||
MsgId::new(message_id).get_html(&ctx).await
|
||||
}
|
||||
|
||||
/// Opt out of truncating long messages when loading.
|
||||
///
|
||||
/// Should be used by the UIs that can handle long text messages.
|
||||
async fn dont_truncate_long_messages(&self, account_id: u32) -> Result<()> {
|
||||
let ctx = self.get_context(account_id).await?;
|
||||
dont_truncate_long_messages(&ctx);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// get multiple messages in one call,
|
||||
/// if loading one message fails the error is stored in the result object in it's place.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user