Deprecate marker1before argument of dc_get_chat_msgs()

This commit is contained in:
link2xt
2022-04-30 19:03:39 +00:00
committed by Simon Laux
parent e603a10ab4
commit bd5b9573f6
17 changed files with 72 additions and 162 deletions

View File

@@ -1980,9 +1980,7 @@ mod tests {
.unwrap();
let mut has_image = false;
let chatitems = chat::get_chat_msgs(&t, device_chat_id, 0, None)
.await
.unwrap();
let chatitems = chat::get_chat_msgs(&t, device_chat_id, 0).await.unwrap();
for chatitem in chatitems {
if let ChatItem::Message { msg_id } = chatitem {
if let Ok(msg) = Message::load_from_db(&t, msg_id).await {
@@ -2128,7 +2126,7 @@ mod tests {
assert_eq!(msg1.chat_id, msg2.chat_id);
let chats = Chatlist::try_load(&bob, 0, None, None).await?;
assert_eq!(chats.len(), 1);
let msgs = chat::get_chat_msgs(&bob, bob_chat_id, 0, None).await?;
let msgs = chat::get_chat_msgs(&bob, bob_chat_id, 0).await?;
assert_eq!(msgs.len(), 2);
assert_eq!(bob.get_fresh_msgs().await?.len(), 0);
@@ -2139,7 +2137,7 @@ mod tests {
let bob_chat = Chat::load_from_db(&bob, bob_chat_id).await?;
assert_eq!(bob_chat.blocked, Blocked::Request);
let msgs = chat::get_chat_msgs(&bob, bob_chat_id, 0, None).await?;
let msgs = chat::get_chat_msgs(&bob, bob_chat_id, 0).await?;
assert_eq!(msgs.len(), 2);
bob_chat_id.accept(&bob).await.unwrap();