mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 22:16:30 +03:00
Remove bitflags from get_chat_msgs() interface
get_chat_msgs() function is split into new get_chat_msgs() without flags and get_chat_msgs_ex() which accepts booleans instead of bitflags. FFI call dc_get_chat_msgs() is still using bitflags for compatibility. JSON-RPC calls get_message_ids() and get_message_list_items() accept booleans instead of bitflags now.
This commit is contained in:
@@ -4,7 +4,6 @@ use anyhow::Result;
|
||||
|
||||
use crate::chat;
|
||||
use crate::chat::ChatId;
|
||||
use crate::constants;
|
||||
use crate::contact;
|
||||
use crate::contact::Contact;
|
||||
use crate::contact::ContactId;
|
||||
@@ -345,9 +344,16 @@ async fn mark_as_verified(this: &TestContext, other: &TestContext) {
|
||||
}
|
||||
|
||||
async fn get_last_info_msg(t: &TestContext, chat_id: ChatId) -> Option<Message> {
|
||||
let msgs = chat::get_chat_msgs(&t.ctx, chat_id, constants::DC_GCM_INFO_ONLY)
|
||||
.await
|
||||
.unwrap();
|
||||
let msgs = chat::get_chat_msgs_ex(
|
||||
&t.ctx,
|
||||
chat_id,
|
||||
chat::MessageListOptions {
|
||||
info_only: true,
|
||||
add_daymarker: false,
|
||||
},
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
let msg_id = if let chat::ChatItem::Message { msg_id } = msgs.last()? {
|
||||
msg_id
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user