Skip to content

Commit

Permalink
fix extend discovery via ws
Browse files Browse the repository at this point in the history
  • Loading branch information
paulormart committed Jan 15, 2025
1 parent b732f7e commit 32f3947
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/api/ws/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ impl Channel {
)
.await
{
// Extend with requested verbosity data
if let Ok(tmp) = redis::cmd("HGETALL")
.arg(CacheKey::AuthorityRecordVerbose(
key.to_string(),
Expand All @@ -507,6 +508,23 @@ impl Channel {
{
auth.extend(tmp);
}
// Additional extend with discovery data
if let Ok(mut discovery) = redis::cmd(
"HGETALL",
)
.arg(CacheKey::AuthorityRecordVerbose(
key.to_string(),
Verbosity::Discovery,
))
.query_async::<Connection, CacheMap>(
&mut conn,
)
.await
{
// NOTE: discovery.ips is not needed to be available, so let's skip it.
discovery.remove("ips");
auth.extend(discovery);
}
data.push(auth.into());
}
}
Expand Down

0 comments on commit 32f3947

Please sign in to comment.