Merge pull request #1081 from strukturag/federation-ping-room

Fix URL to send federated ping requests.
This commit is contained in:
Joachim Bauch 2025-09-29 14:18:32 +02:00 committed by GitHub
commit c8968e5171
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

2
hub.go
View file

@ -1852,7 +1852,7 @@ func (h *Hub) publishFederatedSessions() (int, *sync.WaitGroup) {
e, found := entries[u]
if !found {
p := session.ParsedBackendUrl()
p := session.ParsedBackendOcsUrl()
if p == nil {
// Should not happen, invalid URLs should get rejected earlier.
continue

View file

@ -670,6 +670,8 @@ func registerBackendHandler(t *testing.T, router *mux.Router) {
func registerBackendHandlerUrl(t *testing.T, router *mux.Router, url string) {
handleFunc := validateBackendChecksum(t, func(w http.ResponseWriter, r *http.Request, request *BackendClientRequest) *BackendClientResponse {
assert.Regexp(t, "/ocs/v2\\.php/apps/spreed/api/v[\\d]/signaling/backend$", r.URL.Path, "invalid url for backend request %+v", request)
switch request.Type {
case "auth":
return processAuthRequest(t, w, r, request)

View file

@ -51,7 +51,7 @@ func NewRoomPingForTest(t *testing.T) (*url.URL, *RoomPing) {
p, err := NewRoomPing(backend, backend.capabilities)
require.NoError(err)
u, err := url.Parse(server.URL)
u, err := url.Parse(server.URL + "/" + PathToOcsSignalingBackend)
require.NoError(err)
return u, p