Skip to content

Commit ebfc1e2

Browse files
committed
federation/client: fix send join+leave API versions
1 parent 4a8cc5e commit ebfc1e2

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
@@ -353,7 +353,7 @@ func (c *Client) SendJoin(ctx context.Context, req *ReqSendJoin) (resp *RespSend
353353
_, _, err = c.MakeFullRequest(ctx, RequestParams{
354354
ServerName: req.Via,
355355
Method: http.MethodPut,
356-
Path: URLPath{"v1", "send_join", req.RoomID, req.EventID},
356+
Path: URLPath{"v2", "send_join", req.RoomID, req.EventID},
357357
Query: url.Values{
358358
"omit_members": {strconv.FormatBool(req.OmitMembers)},
359359
},
@@ -403,7 +403,7 @@ func (c *Client) SendLeave(ctx context.Context, req *ReqSendLeave) (err error) {
403403
_, _, err = c.MakeFullRequest(ctx, RequestParams{
404404
ServerName: req.Via,
405405
Method: http.MethodPut,
406-
Path: URLPath{"v1", "send_leave", req.RoomID, req.EventID},
406+
Path: URLPath{"v2", "send_leave", req.RoomID, req.EventID},
407407
Authenticate: true,
408408
RequestJSON: req.Event,
409409
})

0 commit comments

Comments
 (0)