Skip to content

Commit

Permalink
refactor: void to any
Browse files Browse the repository at this point in the history
  • Loading branch information
domw30 committed Oct 12, 2023
1 parent f564611 commit 0a861eb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib/chat/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface IChatClient {
optimisticId?: string
) => Promise<MessagesResponse>;
fetchConversationsWithUsers: (users: User[]) => Promise<Partial<Channel>[]>;
deleteMessageByRoomId: (channelId: string, messageId: number) => Promise<void>;
deleteMessageByRoomId: (channelId: string, messageId: number) => Promise<any>;
}

export class Chat {
Expand Down Expand Up @@ -90,7 +90,7 @@ export class Chat {
return this.client.createConversation(users, name, image, optimisticId);
}

async deleteMessageByRoomId(channelId: string, messageId: number): Promise<void> {
async deleteMessageByRoomId(channelId: string, messageId: number): Promise<any> {
return this.client.deleteMessageByRoomId(channelId, messageId);
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/chat/matrix-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class MatrixClient implements IChatClient {
};
}

async deleteMessageByRoomId(channelId: string, messageId: number): Promise<void> {
async deleteMessageByRoomId(channelId: string, messageId: number): Promise<any> {
await this.matrix.redactEvent(channelId, messageId.toString(), null);
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/chat/sendbird-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
async deleteMessageByRoomId(channelId: string, messageId: number): Promise<any> {
try {
await del<any>(`/chatChannels/${channelId}/message`).send({ message: { id: messageId } });
} catch (error: any) {
Expand Down

0 comments on commit 0a861eb

Please sign in to comment.