Skip to content

Commit f5b10d0

Browse files
committed
federation/client: fix send join+leave API versions
1 parent 2790e25 commit f5b10d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

federation/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ func (c *Client) SendJoin(ctx context.Context, req *ReqSendJoin) (resp *RespSend
361361
_, _, err = c.MakeFullRequest(ctx, RequestParams{
362362
ServerName: req.Via,
363363
Method: http.MethodPut,
364-
Path: URLPath{"v1", "send_join", req.RoomID, req.EventID},
364+
Path: URLPath{"v2", "send_join", req.RoomID, req.EventID},
365365
Query: url.Values{
366366
"omit_members": {strconv.FormatBool(req.OmitMembers)},
367367
},
@@ -411,7 +411,7 @@ func (c *Client) SendLeave(ctx context.Context, req *ReqSendLeave) (err error) {
411411
_, _, err = c.MakeFullRequest(ctx, RequestParams{
412412
ServerName: req.Via,
413413
Method: http.MethodPut,
414-
Path: URLPath{"v1", "send_leave", req.RoomID, req.EventID},
414+
Path: URLPath{"v2", "send_leave", req.RoomID, req.EventID},
415415
Authenticate: true,
416416
RequestJSON: req.Event,
417417
})

0 commit comments

Comments
 (0)