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

Method recv_msg_opt

src/test_utils.rs:837–842  ·  view source on GitHub ↗

Receive a message using the `receive_imf()` pipeline. This is similar to `recv_msg()`, but doesn't assume that the message is shown in the chat.

(&self, msg: &SentMessage<'_>)

Source from the content-addressed store, hash-verified

835 /// Receive a message using the `receive_imf()` pipeline. This is similar
836 /// to `recv_msg()`, but doesn't assume that the message is shown in the chat.
837 pub async fn recv_msg_opt(&self, msg: &SentMessage<'_>) -> Option<ReceivedMsg> {
838 receive_imf(self, msg.payload().as_bytes(), false)
839 .await
840 .unwrap()
841 .filter(|msg| msg.chat_id != DC_CHAT_ID_TRASH)
842 }
843
844 /// Receives a message and asserts that it goes to trash chat.
845 pub async fn recv_msg_trash(&self, msg: &SentMessage<'_>) {

Callers 14

recv_msgMethod · 0.80
recv_msg_hiddenMethod · 0.80
test_reaction_summaryFunction · 0.80
test_resend_own_messageFunction · 0.80
test_send_edit_requestFunction · 0.80
test_send_delete_requestFunction · 0.80
test_forged_fromFunction · 0.80

Calls 3

receive_imfFunction · 0.85
payloadMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected