Chore: Migrate REST API - saveRoomSettings to Typescript (#3787)

This commit is contained in:
Reinaldo Neto 2022-03-03 15:15:06 -03:00 committed by GitHub
parent 9751cc4426
commit 16fd64b260
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 1 deletions

View File

@ -574,7 +574,22 @@ export const hideRoom = (roomId: string, t: RoomTypes): any =>
// @ts-ignore
sdk.post(`${roomTypeToApiType(t)}.close`, { roomId });
export const saveRoomSettings = (rid: string, params: any) =>
export const saveRoomSettings = (
rid: string,
params: {
roomName?: string;
roomAvatar?: string;
roomDescription?: string;
roomTopic?: string;
roomAnnouncement?: string;
roomType?: SubscriptionType;
readOnly?: boolean;
reactWhenReadOnly?: boolean;
systemMessages?: string[];
joinCode?: string;
encrypted?: boolean;
}
): Promise<{ result: boolean; rid: string }> =>
// RC 0.55.0
sdk.methodCallWrapper('saveRoomSettings', rid, params);