mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 04:46:29 +03:00
Repair test
This commit is contained in:
@@ -374,14 +374,18 @@ impl<'a, 'b> MimeFactory<'a, 'b> {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
let self_name =
|
let self_name = match self.context.get_config(Config::Displayname).await
|
||||||
match self.context.get_config(Config::Displayname).await {
|
{
|
||||||
Some(name) => Some(name),
|
Some(name) => name,
|
||||||
None => self.context.get_config(Config::Displayname).await,
|
None => match self.context.get_config(Config::Addr).await {
|
||||||
}
|
Some(name) => name,
|
||||||
.unwrap_or_else(|| {
|
None => self
|
||||||
self.context.stock_str(StockMessage::MessengerName)
|
.context
|
||||||
});
|
.stock_str(StockMessage::MessengerName)
|
||||||
|
.await
|
||||||
|
.to_string(),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
self.context
|
self.context
|
||||||
.stock_string_repl_str(
|
.stock_string_repl_str(
|
||||||
@@ -1344,7 +1348,7 @@ mod tests {
|
|||||||
let mf = MimeFactory::from_msg(&t.ctx, &new_msg, false)
|
let mf = MimeFactory::from_msg(&t.ctx, &new_msg, false)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
assert_eq!(mf.subject_str().await, "Chat: ");
|
assert_eq!(mf.subject_str().await, "Message from alice@example.org");
|
||||||
|
|
||||||
// 4. Receive messages with unicode characters and make sure that we do not panic (we do not care about the result)
|
// 4. Receive messages with unicode characters and make sure that we do not panic (we do not care about the result)
|
||||||
msg_to_subject_str(
|
msg_to_subject_str(
|
||||||
|
|||||||
Reference in New Issue
Block a user