MCPcopy Create free account
hub / github.com/chatmail/core / check_receiver

Function check_receiver

src/html.rs:535–545  ·  view source on GitHub ↗
(ctx: &TestContext, chat: &Chat, sender: &TestContext)

Source from the content-addressed store, hash-verified

533 bob.allow_unencrypted().await?;
534 let chat_bob = bob.create_chat_with_contact("", "alice@example.org").await;
535 async fn check_receiver(ctx: &TestContext, chat: &Chat, sender: &TestContext) {
536 let msg = ctx.recv_msg(&sender.pop_sent_msg().await).await;
537 assert_eq!(chat.id, msg.chat_id);
538 assert_ne!(msg.get_from_id(), ContactId::SELF);
539 assert_eq!(msg.is_dc_message, MessengerMessage::Yes);
540 assert!(msg.is_forwarded());
541 assert!(msg.get_text().contains("this is plain"));
542 assert!(msg.has_html());
543 let html = msg.get_id().get_html(ctx).await.unwrap().unwrap();
544 assert!(html.contains("this is <b>html</b>"));
545 }
546 check_receiver(bob, &chat_bob, alice).await;
547
548 // Let's say that the alice and bob profiles are on the same device,

Callers 1

test_html_forwardingFunction · 0.85

Calls 4

recv_msgMethod · 0.80
pop_sent_msgMethod · 0.80
get_htmlMethod · 0.80
get_idMethod · 0.45

Tested by 1

test_html_forwardingFunction · 0.68