mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 07:16:31 +03:00
fix(dc_lot): correct test2
This commit is contained in:
committed by
Friedel Ziegelmayer
parent
2414a618e2
commit
89531dfb62
@@ -6,8 +6,6 @@ use crate::dc_tools::*;
|
|||||||
use crate::stock::StockMessage;
|
use crate::stock::StockMessage;
|
||||||
use crate::types::*;
|
use crate::types::*;
|
||||||
use crate::x::*;
|
use crate::x::*;
|
||||||
use std::ffi::CString;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
/* * Structure behind dc_lot_t */
|
/* * Structure behind dc_lot_t */
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
@@ -171,14 +169,15 @@ pub unsafe fn dc_lot_fill(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let msgtext_c = (*msg)
|
let message_text = (*msg).text.as_ref().unwrap();
|
||||||
.text
|
|
||||||
.as_ref()
|
|
||||||
.map(|s| CString::yolo(String::as_str(s)));
|
|
||||||
let msgtext_ptr = msgtext_c.map_or(ptr::null(), |s| s.as_ptr());
|
|
||||||
|
|
||||||
(*lot).text2 =
|
(*lot).text2 = dc_msg_get_summarytext_by_raw(
|
||||||
dc_msg_get_summarytext_by_raw((*msg).type_0, msgtext_ptr, &mut (*msg).param, 160, context);
|
(*msg).type_0,
|
||||||
|
message_text.strdup(),
|
||||||
|
&mut (*msg).param,
|
||||||
|
160,
|
||||||
|
context,
|
||||||
|
);
|
||||||
|
|
||||||
(*lot).timestamp = dc_msg_get_timestamp(msg);
|
(*lot).timestamp = dc_msg_get_timestamp(msg);
|
||||||
(*lot).state = (*msg).state;
|
(*lot).state = (*msg).state;
|
||||||
|
|||||||
Reference in New Issue
Block a user