mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:06:07 -04:00
Fix get federation status of destination if no error occured (#11593)
This commit is contained in:
parent
d8f94eeec2
commit
3b51c763ba
4 changed files with 88 additions and 25 deletions
|
@ -560,3 +560,14 @@ class TransactionWorkerStore(CacheInvalidationWorkerStore):
|
|||
return await self.db_pool.runInteraction(
|
||||
"get_destinations_paginate_txn", get_destinations_paginate_txn
|
||||
)
|
||||
|
||||
async def is_destination_known(self, destination: str) -> bool:
|
||||
"""Check if a destination is known to the server."""
|
||||
result = await self.db_pool.simple_select_one_onecol(
|
||||
table="destinations",
|
||||
keyvalues={"destination": destination},
|
||||
retcol="1",
|
||||
allow_none=True,
|
||||
desc="is_destination_known",
|
||||
)
|
||||
return bool(result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue