mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 05:16:28 +03:00
implement dclogin scheme (#3541)
* start implementing dclogin scheme * fix formatting * add test for usename+extension@host cases * add test with all advanced options * add changelog * jsonrpc api and regenerate node constants * Update src/qr/dclogin_scheme.rs Co-authored-by: Hocuri <hocuri@gmx.de> * apply Hocuris comments from code review * fix clippy * Use .eq_ignore_ascii_case() * rename internal function apply_from_login_qr to configure_from_login_qr * fix error message * cargo fmt * remove test todo comment Co-authored-by: Hocuri <hocuri@gmx.de>
This commit is contained in:
@@ -58,6 +58,7 @@ impl Lot {
|
||||
Qr::WithdrawVerifyGroup { grpname, .. } => Some(grpname),
|
||||
Qr::ReviveVerifyContact { .. } => None,
|
||||
Qr::ReviveVerifyGroup { grpname, .. } => Some(grpname),
|
||||
Qr::Login { address, .. } => Some(address),
|
||||
},
|
||||
Self::Error(err) => Some(err),
|
||||
}
|
||||
@@ -108,6 +109,7 @@ impl Lot {
|
||||
Qr::WithdrawVerifyGroup { .. } => LotState::QrWithdrawVerifyGroup,
|
||||
Qr::ReviveVerifyContact { .. } => LotState::QrReviveVerifyContact,
|
||||
Qr::ReviveVerifyGroup { .. } => LotState::QrReviveVerifyGroup,
|
||||
Qr::Login { .. } => LotState::QrLogin,
|
||||
},
|
||||
Self::Error(_err) => LotState::QrError,
|
||||
}
|
||||
@@ -131,6 +133,7 @@ impl Lot {
|
||||
Qr::WithdrawVerifyGroup { .. } => Default::default(),
|
||||
Qr::ReviveVerifyContact { contact_id, .. } => contact_id.to_u32(),
|
||||
Qr::ReviveVerifyGroup { .. } => Default::default(),
|
||||
Qr::Login { .. } => Default::default(),
|
||||
},
|
||||
Self::Error(_) => Default::default(),
|
||||
}
|
||||
@@ -195,6 +198,9 @@ pub enum LotState {
|
||||
/// text1=groupname
|
||||
QrReviveVerifyGroup = 512,
|
||||
|
||||
/// text1=email_address
|
||||
QrLogin = 520,
|
||||
|
||||
// Message States
|
||||
MsgInFresh = 10,
|
||||
MsgInNoticed = 13,
|
||||
|
||||
Reference in New Issue
Block a user