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

Function check_sender

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

Source from the content-addressed store, hash-verified

517 .await
518 .unwrap();
519 async fn check_sender(ctx: &TestContext, chat: &Chat) {
520 let msg = ctx.get_last_msg_in(chat.get_id()).await;
521 assert_eq!(msg.get_from_id(), ContactId::SELF);
522 assert_eq!(msg.is_dc_message, MessengerMessage::Yes);
523 assert!(msg.is_forwarded());
524 assert!(msg.get_text().contains("this is plain"));
525 assert!(msg.has_html());
526 let html = msg.get_id().get_html(ctx).await.unwrap().unwrap();
527 assert!(html.contains("this is <b>html</b>"));
528 }
529 check_sender(alice, &chat_alice).await;
530
531 // bob: check that bob also got the html-part of the forwarded message

Callers 1

test_html_forwardingFunction · 0.85

Calls 3

get_last_msg_inMethod · 0.80
get_htmlMethod · 0.80
get_idMethod · 0.45

Tested by 1

test_html_forwardingFunction · 0.68