aboutsummaryrefslogtreecommitdiff
path: root/federationapi/internal/perform.go
diff options
context:
space:
mode:
Diffstat (limited to 'federationapi/internal/perform.go')
-rw-r--r--federationapi/internal/perform.go30
1 files changed, 8 insertions, 22 deletions
diff --git a/federationapi/internal/perform.go b/federationapi/internal/perform.go
index aac36cc7..577cb70e 100644
--- a/federationapi/internal/perform.go
+++ b/federationapi/internal/perform.go
@@ -564,20 +564,6 @@ func (r *FederationInternalAPI) PerformInvite(
}
// PerformServersAlive implements api.FederationInternalAPI
-func (r *FederationInternalAPI) PerformServersAlive(
- ctx context.Context,
- request *api.PerformServersAliveRequest,
- response *api.PerformServersAliveResponse,
-) (err error) {
- for _, srv := range request.Servers {
- _ = r.db.RemoveServerFromBlacklist(srv)
- r.queues.RetryServer(srv)
- }
-
- return nil
-}
-
-// PerformServersAlive implements api.FederationInternalAPI
func (r *FederationInternalAPI) PerformBroadcastEDU(
ctx context.Context,
request *api.PerformBroadcastEDURequest,
@@ -600,18 +586,18 @@ func (r *FederationInternalAPI) PerformBroadcastEDU(
if err = r.queues.SendEDU(edu, r.cfg.Matrix.ServerName, destinations); err != nil {
return fmt.Errorf("r.queues.SendEDU: %w", err)
}
-
- wakeReq := &api.PerformServersAliveRequest{
- Servers: destinations,
- }
- wakeRes := &api.PerformServersAliveResponse{}
- if err := r.PerformServersAlive(ctx, wakeReq, wakeRes); err != nil {
- return fmt.Errorf("r.PerformServersAlive: %w", err)
- }
+ r.MarkServersAlive(destinations)
return nil
}
+func (r *FederationInternalAPI) MarkServersAlive(destinations []gomatrixserverlib.ServerName) {
+ for _, srv := range destinations {
+ _ = r.db.RemoveServerFromBlacklist(srv)
+ r.queues.RetryServer(srv)
+ }
+}
+
func sanityCheckAuthChain(authChain []*gomatrixserverlib.Event) error {
// sanity check we have a create event and it has a known room version
for _, ev := range authChain {