Skip to content

Commit

Permalink
Update types to match spec (#3330)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored May 5, 2023
1 parent 8ff8685 commit 8ab2e10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ interface IJoinRequestBody {

interface ITagMetadata {
[key: string]: any;
order: number;
order?: number;
}

interface IMessagesResponse {
Expand Down Expand Up @@ -4185,7 +4185,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
* @returns Promise which resolves: to an empty object
* @returns Rejects: with an error response.
*/
public setRoomTag(roomId: string, tagName: string, metadata: ITagMetadata): Promise<{}> {
public setRoomTag(roomId: string, tagName: string, metadata: ITagMetadata = {}): Promise<{}> {
const path = utils.encodeUri("/user/$userId/rooms/$roomId/tags/$tag", {
$userId: this.credentials.userId!,
$roomId: roomId,
Expand Down

0 comments on commit 8ab2e10

Please sign in to comment.