Rename Param::MessageId into Param::MsgId

MsgId refers to database ID, same as crate::message::MsgId newtype.
This commit is contained in:
Alexander Krotov
2020-01-19 23:06:49 +03:00
parent b50d2358d3
commit 318194a216
2 changed files with 3 additions and 3 deletions

View File

@@ -1079,7 +1079,7 @@ fn suspend_smtp_thread(context: &Context, suspend: bool) {
fn send_mdn(context: &Context, msg: &Message) -> Result<()> {
let mut param = Params::new();
param.set(Param::MessageId, msg.id.to_u32().to_string());
param.set(Param::MsgId, msg.id.to_u32().to_string());
job_add(context, Action::SendMdn, msg.from_id as i32, param, 0);

View File

@@ -119,7 +119,7 @@ pub enum Param {
GroupName = b'g',
/// For MDN-sending job
MessageId = b'I',
MsgId = b'I',
}
/// Possible values for `Param::ForcePlaintext`.
@@ -317,7 +317,7 @@ impl Params {
}
pub fn get_msg_id(&self) -> Option<MsgId> {
self.get(Param::MessageId)
self.get(Param::MsgId)
.and_then(|x| x.parse::<u32>().ok())
.map(MsgId::new)
}