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

Method send_msg

src/test_utils.rs:1075–1083  ·  view source on GitHub ↗

Sends out the message to the specified chat. This is not hooked up to any SMTP-IMAP pipeline, so the other account must call [`TestContext::recv_msg`] with the returned [`SentMessage`] if it wants to receive the message.

(&self, chat_id: ChatId, msg: &mut Message)

Source from the content-addressed store, hash-verified

1073 /// [`TestContext::recv_msg`] with the returned [`SentMessage`] if it wants to receive
1074 /// the message.
1075 pub async fn send_msg(&self, chat_id: ChatId, msg: &mut Message) -> SentMessage<'_> {
1076 let msg_id = chat::send_msg(self, chat_id, msg).await.unwrap();
1077 let res = self.pop_sent_msg().await;
1078 assert_eq!(
1079 res.sender_msg_id, msg_id,
1080 "Apparently the message was not actually sent out"
1081 );
1082 res
1083 }
1084
1085 pub async fn golden_test_chat(&self, chat_id: ChatId, filename: &str) {
1086 let filename = Path::new("test-data/golden/").join(filename);

Callers 15

test_html_forwardingFunction · 0.45
send_textMethod · 0.45
testMethod · 0.45
test_send_gif_as_stickerFunction · 0.45
send_msg_get_subjectFunction · 0.45
test_subject_in_groupFunction · 0.45

Calls 2

send_msgFunction · 0.85
pop_sent_msgMethod · 0.80

Tested by

no test coverage detected