mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 18:06:35 +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?;
|
||||
context.emit_event(SendProgress::ProviderListening.into());
|
||||
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))
|
||||
}
|
||||
|
||||
@@ -500,7 +500,8 @@ async fn run_get_request(
|
||||
ticket: Ticket,
|
||||
) -> anyhow::Result<Stats> {
|
||||
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 initial = fsm::start(connection, request);
|
||||
use fsm::*;
|
||||
|
||||
Reference in New Issue
Block a user