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
Filter out falsey opts in /relations API hits (#2059)
This commit is contained in:
committed by
GitHub
parent
6244d77d44
commit
169b6b5572
@@ -6763,11 +6763,7 @@ export class MatrixClient extends EventEmitter {
|
||||
eventType?: EventType | string | null,
|
||||
opts: IRelationsRequestOpts = {},
|
||||
): Promise<IRelationsResponse> {
|
||||
const params = new URLSearchParams();
|
||||
for (const [key, val] of Object.entries(opts)) {
|
||||
params.set(key, val);
|
||||
}
|
||||
const queryString = params.toString();
|
||||
const queryString = utils.encodeParams(opts as Record<string, string | number>);
|
||||
|
||||
let templatedUrl = "/rooms/$roomId/relations/$eventId";
|
||||
if (relationType !== null) templatedUrl += "/$relationType";
|
||||
|
||||
Reference in New Issue
Block a user