Skip to content

Commit 32f3947

Browse files
committed
fix extend discovery via ws
1 parent b732f7e commit 32f3947

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/api/ws/channel.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ impl Channel {
495495
)
496496
.await
497497
{
498+
// Extend with requested verbosity data
498499
if let Ok(tmp) = redis::cmd("HGETALL")
499500
.arg(CacheKey::AuthorityRecordVerbose(
500501
key.to_string(),
@@ -507,6 +508,23 @@ impl Channel {
507508
{
508509
auth.extend(tmp);
509510
}
511+
// Additional extend with discovery data
512+
if let Ok(mut discovery) = redis::cmd(
513+
"HGETALL",
514+
)
515+
.arg(CacheKey::AuthorityRecordVerbose(
516+
key.to_string(),
517+
Verbosity::Discovery,
518+
))
519+
.query_async::<Connection, CacheMap>(
520+
&mut conn,
521+
)
522+
.await
523+
{
524+
// NOTE: discovery.ips is not needed to be available, so let's skip it.
525+
discovery.remove("ips");
526+
auth.extend(discovery);
527+
}
510528
data.push(auth.into());
511529
}
512530
}

0 commit comments

Comments
 (0)