Skip to content

Commit 6d76e3f

Browse files
authored
fix: type of image parameter in MessageInputContext's uploadNewImage prop to Partial<Asset> (#1762)
1 parent c603cad commit 6d76e3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

package/src/contexts/messageInputContext/MessageInputContext.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export type LocalMessageInputContext<
211211
/** Function for attempting to upload an image */
212212
uploadImage: ({ newImage }: { newImage: ImageUpload }) => Promise<void>;
213213
uploadNewFile: (file: File) => Promise<void>;
214-
uploadNewImage: (image: Asset) => Promise<void>;
214+
uploadNewImage: (image: Partial<Asset>) => Promise<void>;
215215
};
216216

217217
export type InputMessageInputContextValue<
@@ -1053,7 +1053,7 @@ export const MessageInputProvider = <
10531053
}
10541054
};
10551055

1056-
const uploadNewImage = async (image: Asset) => {
1056+
const uploadNewImage = async (image: Partial<Asset>) => {
10571057
const id = generateRandomId();
10581058

10591059
const isBlockedImageMimeType = blockedImageMimeTypes?.some((mimeType: string) =>

0 commit comments

Comments
 (0)