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

@@ -1449,16 +1449,10 @@ mod tests {
};
// delete self-talk first; this adds a message to device-chat about how self-talk can be restored
let device_chat_msgs_before = chat::get_chat_msgs(&t, device_chat_id, 0)
.await
.unwrap()
.len();
let device_chat_msgs_before = chat::get_chat_msgs(&t, device_chat_id).await.unwrap().len();
self_talk_id.delete(&t).await.ok();
assert_eq!(
chat::get_chat_msgs(&t, device_chat_id, 0)
.await
.unwrap()
.len(),
chat::get_chat_msgs(&t, device_chat_id).await.unwrap().len(),
device_chat_msgs_before + 1
);