mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 01:16:29 +03:00
Send and receive backup over network using QR code
This adds functionality to send and receive a backup over the network using a QR code. The sender or provider prepares the backup, sets up a server that waits for clients. It provides a ticket in the form of a QR code which contains connection and authentication information. The receiver uses the QR code to connect to the provider and fetches backup, restoring it locally.
This commit is contained in:
@@ -32,6 +32,9 @@ pub enum QrObject {
|
||||
Account {
|
||||
domain: String,
|
||||
},
|
||||
Backup {
|
||||
ticket: Vec<u8>,
|
||||
},
|
||||
WebrtcInstance {
|
||||
domain: String,
|
||||
instance_pattern: String,
|
||||
@@ -126,6 +129,9 @@ impl From<Qr> for QrObject {
|
||||
}
|
||||
Qr::FprWithoutAddr { fingerprint } => QrObject::FprWithoutAddr { fingerprint },
|
||||
Qr::Account { domain } => QrObject::Account { domain },
|
||||
Qr::Backup { ticket } => QrObject::Backup {
|
||||
ticket: ticket.to_bytes(),
|
||||
},
|
||||
Qr::WebrtcInstance {
|
||||
domain,
|
||||
instance_pattern,
|
||||
|
||||
Reference in New Issue
Block a user