Add two TODOs, and remove two

This commit is contained in:
Hocuri
2026-03-16 14:47:29 +01:00
parent 57529407e3
commit 35961a0a33
2 changed files with 4 additions and 2 deletions

View File

@@ -827,6 +827,7 @@ impl Context {
"UPDATE config SET value=? WHERE keyname='configured_addr'",
(addr,),
)?;
// TODO set as published
// Update the timestamp for the primary transport
// so it becomes the first in `get_all_self_addrs()` list
@@ -975,7 +976,7 @@ impl Context {
}
/// Returns all published self addresses, newest first.
/// See TODO API
/// See `[Context::set_transport_unpublished]`
pub(crate) async fn get_published_self_addrs(&self) -> Result<Vec<String>> {
self.sql
.query_map_vec(
@@ -999,7 +1000,7 @@ impl Context {
}
/// Returns all published secondary self addresses.
/// See TODO API
/// See `[Context::set_transport_unpublished]`
pub(crate) async fn get_published_secondary_self_addrs(&self) -> Result<Vec<String>> {
self.sql
.query_map_vec(

View File

@@ -273,6 +273,7 @@ impl Context {
/// existing secondary transports are set to unpublished,
/// so that an existing transport address doesn't suddenly get spammed with a lot of messages.
pub async fn set_transport_unpublished(&self, addr: &str, unpublished: bool) -> Result<()> {
// TODO check if this is the primary transport
self.sql
.execute(
"UPDATE transports SET is_published=? WHERE addr=?",