Skip to content

Commit

Permalink
fix: type of image parameter in MessageInputContext's uploadNewImage …
Browse files Browse the repository at this point in the history
…prop to Partial<Asset> (GetStream#1762)
  • Loading branch information
khushal87 authored Oct 18, 2022
1 parent c603cad commit 6d76e3f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export type LocalMessageInputContext<
/** Function for attempting to upload an image */
uploadImage: ({ newImage }: { newImage: ImageUpload }) => Promise<void>;
uploadNewFile: (file: File) => Promise<void>;
uploadNewImage: (image: Asset) => Promise<void>;
uploadNewImage: (image: Partial<Asset>) => Promise<void>;
};

export type InputMessageInputContextValue<
Expand Down Expand Up @@ -1053,7 +1053,7 @@ export const MessageInputProvider = <
}
};

const uploadNewImage = async (image: Asset) => {
const uploadNewImage = async (image: Partial<Asset>) => {
const id = generateRandomId();

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

0 comments on commit 6d76e3f

Please sign in to comment.