Repair test

This commit is contained in:
Hocuri
2020-05-29 22:10:06 +02:00
committed by holger krekel
parent e1ff657c78
commit f172e92098

View File

@@ -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(