mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +03:00
cleanup
This commit is contained in:
@@ -249,6 +249,7 @@ pub struct InnerContext {
|
|||||||
|
|
||||||
/// [MagicEndpoint] needed for iroh peer channels.
|
/// [MagicEndpoint] needed for iroh peer channels.
|
||||||
pub(crate) endpoint: Mutex<Option<MagicEndpoint>>,
|
pub(crate) endpoint: Mutex<Option<MagicEndpoint>>,
|
||||||
|
|
||||||
/// [Gossip] needed for iroh peer channels.
|
/// [Gossip] needed for iroh peer channels.
|
||||||
pub(crate) gossip: Mutex<Option<Gossip>>,
|
pub(crate) gossip: Mutex<Option<Gossip>>,
|
||||||
}
|
}
|
||||||
@@ -446,7 +447,7 @@ impl Context {
|
|||||||
self.scheduler.restart(self).await;
|
self.scheduler.restart(self).await;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Indicates that the network likely has come back.
|
/// Indicate that the network likely has come back.
|
||||||
pub async fn maybe_network(&self) {
|
pub async fn maybe_network(&self) {
|
||||||
if let Some(ref mut endpoint) = *self.endpoint.lock().await {
|
if let Some(ref mut endpoint) = *self.endpoint.lock().await {
|
||||||
endpoint.network_change().await;
|
endpoint.network_change().await;
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ impl Context {
|
|||||||
pub async fn join_and_subscribe_topic(&self, rfc724_mid: &str, msg_id: MsgId) -> Result<()> {
|
pub async fn join_and_subscribe_topic(&self, rfc724_mid: &str, msg_id: MsgId) -> Result<()> {
|
||||||
let Some(ref gossip) = *self.gossip.lock().await else {
|
let Some(ref gossip) = *self.gossip.lock().await else {
|
||||||
warn!(
|
warn!(
|
||||||
&self,
|
self,
|
||||||
"Not joining topic for {rfc724_mid:?} because there is no gossip."
|
"Not joining topic for {rfc724_mid:?} because there is no gossip."
|
||||||
);
|
);
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
|||||||
@@ -507,8 +507,6 @@ impl Context {
|
|||||||
|
|
||||||
status_update.uid = Some(create_id());
|
status_update.uid = Some(create_id());
|
||||||
let ephemeral = status_update.ephemeral;
|
let ephemeral = status_update.ephemeral;
|
||||||
println!("ephemeral: {}", ephemeral);
|
|
||||||
|
|
||||||
let status_update_serial: StatusUpdateSerial = self
|
let status_update_serial: StatusUpdateSerial = self
|
||||||
.create_status_update_record(
|
.create_status_update_record(
|
||||||
&mut instance,
|
&mut instance,
|
||||||
|
|||||||
Reference in New Issue
Block a user