mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 09:26:30 +03:00
fixes
This commit is contained in:
@@ -501,6 +501,11 @@ impl Context {
|
||||
if send_now {
|
||||
if let Some(ref topic) = status_update.gossip_topic {
|
||||
// find out if any row with `topic = topic` exists in the gossip_peers table
|
||||
|
||||
let topic = TopicId::from_str(&iroh_base::base32::fmt(
|
||||
topic.get(0..32).context("Can't get 32 bytes from topic")?,
|
||||
))?;
|
||||
|
||||
let topic_exists = self
|
||||
.sql
|
||||
.query_row_optional(
|
||||
@@ -512,10 +517,6 @@ impl Context {
|
||||
.context("Failed to check if gossip topic exists")?
|
||||
.is_some();
|
||||
|
||||
let topic = TopicId::from_str(&iroh_base::base32::fmt(
|
||||
topic.get(0..32).context("Can't get 32 bytes from topic")?,
|
||||
))?;
|
||||
|
||||
if !topic_exists {
|
||||
info!(
|
||||
self,
|
||||
@@ -531,10 +532,10 @@ impl Context {
|
||||
.await
|
||||
.unwrap()
|
||||
.node_id;
|
||||
self.join_and_subscribe_topic(topic, instance_msg_id)
|
||||
.await?;
|
||||
self.add_peer_for_topic(instance_msg_id, topic, node_id)
|
||||
.await?;
|
||||
self.join_and_subscribe_topic(topic, instance_msg_id)
|
||||
.await?;
|
||||
ephemeral = false;
|
||||
} else {
|
||||
if let Some(ref gossip) = *self.gossip.lock().await {
|
||||
|
||||
Reference in New Issue
Block a user