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:
link2xt
2023-02-10 17:21:09 +00:00
parent c367bb63d1
commit 07c510c178
22 changed files with 198 additions and 123 deletions

View File

@@ -476,7 +476,7 @@ mod tests {
let chat = Chat::load_from_db(&alice, chat_id).await?;
assert!(chat.is_self_talk());
assert_eq!(Chatlist::try_load(&alice, 0, None, None).await?.len(), 1);
let msgs = chat::get_chat_msgs(&alice, chat_id, 0).await?;
let msgs = chat::get_chat_msgs(&alice, chat_id).await?;
assert_eq!(msgs.len(), 0);
// let alice's other device receive and execute the sync message,