Skip to content

Commit

Permalink
Update types to match spec (matrix-org#3330)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored and saul-jb committed May 9, 2023
1 parent 0da301b commit 6b7c47e
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 @@ -4179,7 +4179,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 6b7c47e

Please sign in to comment.