Skip to content

Commit

Permalink
Set response values to zero if None for /_synapse/admin/v1/federation…
Browse files Browse the repository at this point in the history
…/destinations (matrix-org#16729)
  • Loading branch information
Half-Shot authored Dec 5, 2023
1 parent 0bb8e41 commit ea78355
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/16729.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix GET /_synapse/admin/v1/federation/destinations returning null (instead of 0) for `retry_last_ts` and `retry_interval`.
4 changes: 2 additions & 2 deletions synapse/rest/admin/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ async def on_GET(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
"destinations": [
{
"destination": r[0],
"retry_last_ts": r[1],
"retry_interval": r[2],
"retry_last_ts": r[1] or 0,
"retry_interval": r[2] or 0,
"failure_ts": r[3],
"last_successful_stream_ordering": r[4],
}
Expand Down

0 comments on commit ea78355

Please sign in to comment.