From 2f807f45fb5a3a53f69662f8620eee37c8f73c1e Mon Sep 17 00:00:00 2001 From: Alex Hayton Date: Mon, 20 Jan 2020 20:32:47 +0000 Subject: [PATCH] Added return type to currentUser.subscribeToRoomMultipart (#41708) --- types/pusher__chatkit-client/currentuser.d.ts | 2 +- types/pusher__chatkit-client/pusher__chatkit-client-tests.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/types/pusher__chatkit-client/currentuser.d.ts b/types/pusher__chatkit-client/currentuser.d.ts index 471815a68c..3cdeac6f10 100644 --- a/types/pusher__chatkit-client/currentuser.d.ts +++ b/types/pusher__chatkit-client/currentuser.d.ts @@ -94,7 +94,7 @@ export interface CurrentUser { getJoinableRooms: () => Promise; joinRoom: (params: RoomIdParams) => Promise; leaveRoom: (params: RoomIdParams) => Promise; - subscribeToRoomMultipart: (params: RoomSubcriptionParams) => Promise; + subscribeToRoomMultipart: (params: RoomSubcriptionParams) => Promise; sendSimpleMessage: (params: SendSimpleMessageParams) => Promise; sendMultipartMessage: (params: SendMultipartMessageParams) => Promise; isTypingIn: (params: RoomIdParams) => Promise; diff --git a/types/pusher__chatkit-client/pusher__chatkit-client-tests.ts b/types/pusher__chatkit-client/pusher__chatkit-client-tests.ts index f4a8dbfda3..23054569ec 100644 --- a/types/pusher__chatkit-client/pusher__chatkit-client-tests.ts +++ b/types/pusher__chatkit-client/pusher__chatkit-client-tests.ts @@ -48,7 +48,7 @@ async function test_connecting() { }); // Subscribe to room with no params - await currentUser.subscribeToRoomMultipart({ + const subscribedRoom = await currentUser.subscribeToRoomMultipart({ roomId: room.id, }); @@ -86,4 +86,6 @@ async function test_connecting() { await currentUser.removeUserFromRoom({ userId: 'keith', roomId: room.id }); await currentUser.isTypingIn({ roomId: room.id }); await currentUser.deleteRoom({ roomId: room.id }); + + subscribedRoom.users.forEach(user => user.name); }