You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
fix lint and encode path params properly
This commit is contained in:
@@ -446,12 +446,16 @@ MatrixBaseApis.prototype.fetchRelations =
|
|||||||
queryParams.from = opts.token;
|
queryParams.from = opts.token;
|
||||||
}
|
}
|
||||||
const queryString = utils.encodeParams(queryParams);
|
const queryString = utils.encodeParams(queryParams);
|
||||||
|
const path = utils.encodeUri(
|
||||||
|
"/rooms/$roomId/relations/$eventId/$relationType/$eventType?" + queryString, {
|
||||||
|
$roomId: roomId,
|
||||||
|
$eventId: eventId,
|
||||||
|
$relationType: relationType,
|
||||||
|
$eventType: eventType,
|
||||||
|
});
|
||||||
// valid options include: room_alias_name, visibility, invite
|
// valid options include: room_alias_name, visibility, invite
|
||||||
const response = await this._http.authedRequestWithPrefix(
|
const response = await this._http.authedRequestWithPrefix(
|
||||||
undefined,
|
undefined, "GET", path, null, null, httpApi.PREFIX_UNSTABLE,
|
||||||
"GET",
|
|
||||||
`/rooms/${roomId}/relations/${eventId}/${relationType}/${eventType}?` + queryString,
|
|
||||||
null, null, httpApi.PREFIX_UNSTABLE,
|
|
||||||
);
|
);
|
||||||
return response;
|
return response;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user