From 0a861eb04db38307458ee7c3e8f4ae17d968e1dd Mon Sep 17 00:00:00 2001 From: dominic Date: Thu, 12 Oct 2023 16:58:11 +0100 Subject: [PATCH] refactor: void to any --- src/lib/chat/index.ts | 4 ++-- src/lib/chat/matrix-client.ts | 2 +- src/lib/chat/sendbird-client.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/chat/index.ts b/src/lib/chat/index.ts index 7cdde268a..6d0b18008 100644 --- a/src/lib/chat/index.ts +++ b/src/lib/chat/index.ts @@ -54,7 +54,7 @@ export interface IChatClient { optimisticId?: string ) => Promise; fetchConversationsWithUsers: (users: User[]) => Promise[]>; - deleteMessageByRoomId: (channelId: string, messageId: number) => Promise; + deleteMessageByRoomId: (channelId: string, messageId: number) => Promise; } export class Chat { @@ -90,7 +90,7 @@ export class Chat { return this.client.createConversation(users, name, image, optimisticId); } - async deleteMessageByRoomId(channelId: string, messageId: number): Promise { + async deleteMessageByRoomId(channelId: string, messageId: number): Promise { return this.client.deleteMessageByRoomId(channelId, messageId); } diff --git a/src/lib/chat/matrix-client.ts b/src/lib/chat/matrix-client.ts index 089a09272..b6131024e 100644 --- a/src/lib/chat/matrix-client.ts +++ b/src/lib/chat/matrix-client.ts @@ -209,7 +209,7 @@ export class MatrixClient implements IChatClient { }; } - async deleteMessageByRoomId(channelId: string, messageId: number): Promise { + async deleteMessageByRoomId(channelId: string, messageId: number): Promise { await this.matrix.redactEvent(channelId, messageId.toString(), null); } diff --git a/src/lib/chat/sendbird-client.ts b/src/lib/chat/sendbird-client.ts index 0efd72a15..c76de04ec 100644 --- a/src/lib/chat/sendbird-client.ts +++ b/src/lib/chat/sendbird-client.ts @@ -101,7 +101,7 @@ export class SendbirdClient implements IChatClient { return results.map((u) => ({ id: u.id, display: u.name, profileImage: u.profileImage })); } - async deleteMessageByRoomId(channelId: string, messageId: number): Promise { + async deleteMessageByRoomId(channelId: string, messageId: number): Promise { try { await del(`/chatChannels/${channelId}/message`).send({ message: { id: messageId } }); } catch (error: any) {