mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
add the token to the request
This commit is contained in:
committed by
dignifiedquire
parent
e24af97f3e
commit
8fff9ebe10
@@ -199,7 +199,7 @@ impl BackupProvider {
|
|||||||
.await?;
|
.await?;
|
||||||
context.emit_event(SendProgress::ProviderListening.into());
|
context.emit_event(SendProgress::ProviderListening.into());
|
||||||
info!(context, "Waiting for remote to connect");
|
info!(context, "Waiting for remote to connect");
|
||||||
let ticket = provider.ticket(hash, Some(token)).await?;
|
let ticket = provider.ticket(hash).await?.with_token(Some(token));
|
||||||
Ok((provider, ticket))
|
Ok((provider, ticket))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,7 +500,8 @@ async fn run_get_request(
|
|||||||
ticket: Ticket,
|
ticket: Ticket,
|
||||||
) -> anyhow::Result<Stats> {
|
) -> anyhow::Result<Stats> {
|
||||||
let opts = ticket.as_get_options(Keypair::generate(), Some(default_derp_map()));
|
let opts = ticket.as_get_options(Keypair::generate(), Some(default_derp_map()));
|
||||||
let request = AnyGetRequest::Get(GetRequest::all(ticket.hash()));
|
let request = AnyGetRequest::Get(GetRequest::all(ticket.hash()))
|
||||||
|
.with_token(ticket.token().cloned());
|
||||||
let connection = iroh::dial::dial(opts).await?;
|
let connection = iroh::dial::dial(opts).await?;
|
||||||
let initial = fsm::start(connection, request);
|
let initial = fsm::start(connection, request);
|
||||||
use fsm::*;
|
use fsm::*;
|
||||||
|
|||||||
Reference in New Issue
Block a user