Skip to content

Commit e3746c2

Browse files
committed
Do not use static strings
1 parent b0c25e9 commit e3746c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/mimefactory.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use crate::contact::{Contact, ContactId, Origin};
2323
use crate::context::Context;
2424
use crate::e2ee::EncryptHelper;
2525
use crate::ephemeral::Timer as EphemeralTimer;
26+
use crate::headerdef::HeaderDef;
2627
use crate::key::DcKey;
2728
use crate::location;
2829
use crate::message::{self, Message, MsgId, Viewtype};
@@ -1387,7 +1388,7 @@ impl MimeFactory {
13871388
}
13881389
SystemMessage::IrohNodeAddr => {
13891390
headers.push((
1390-
"Iroh-Node-Addr",
1391+
HeaderDef::IrohNodeAddr.into(),
13911392
mail_builder::headers::text::Text::new(serde_json::to_string(
13921393
&context
13931394
.get_or_try_init_peer_channel()
@@ -1569,7 +1570,7 @@ impl MimeFactory {
15691570
parts.push(context.build_status_update_part(json));
15701571
} else if msg.viewtype == Viewtype::Webxdc {
15711572
headers.push((
1572-
"Iroh-Gossip-Topic",
1573+
HeaderDef::IrohGossipTopic.into(),
15731574
mail_builder::headers::raw::Raw::new(create_iroh_header(context, msg.id).await?)
15741575
.into(),
15751576
));

0 commit comments

Comments
 (0)