mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 06:46:32 +03:00
Add two TODOs, and remove two
This commit is contained in:
@@ -827,6 +827,7 @@ impl Context {
|
|||||||
"UPDATE config SET value=? WHERE keyname='configured_addr'",
|
"UPDATE config SET value=? WHERE keyname='configured_addr'",
|
||||||
(addr,),
|
(addr,),
|
||||||
)?;
|
)?;
|
||||||
|
// TODO set as published
|
||||||
|
|
||||||
// Update the timestamp for the primary transport
|
// Update the timestamp for the primary transport
|
||||||
// so it becomes the first in `get_all_self_addrs()` list
|
// so it becomes the first in `get_all_self_addrs()` list
|
||||||
@@ -975,7 +976,7 @@ impl Context {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns all published self addresses, newest first.
|
/// 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>> {
|
pub(crate) async fn get_published_self_addrs(&self) -> Result<Vec<String>> {
|
||||||
self.sql
|
self.sql
|
||||||
.query_map_vec(
|
.query_map_vec(
|
||||||
@@ -999,7 +1000,7 @@ impl Context {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns all published secondary self addresses.
|
/// 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>> {
|
pub(crate) async fn get_published_secondary_self_addrs(&self) -> Result<Vec<String>> {
|
||||||
self.sql
|
self.sql
|
||||||
.query_map_vec(
|
.query_map_vec(
|
||||||
|
|||||||
@@ -273,6 +273,7 @@ impl Context {
|
|||||||
/// existing secondary transports are set to unpublished,
|
/// existing secondary transports are set to unpublished,
|
||||||
/// so that an existing transport address doesn't suddenly get spammed with a lot of messages.
|
/// 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<()> {
|
pub async fn set_transport_unpublished(&self, addr: &str, unpublished: bool) -> Result<()> {
|
||||||
|
// TODO check if this is the primary transport
|
||||||
self.sql
|
self.sql
|
||||||
.execute(
|
.execute(
|
||||||
"UPDATE transports SET is_published=? WHERE addr=?",
|
"UPDATE transports SET is_published=? WHERE addr=?",
|
||||||
|
|||||||
Reference in New Issue
Block a user