Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed the json parse bug #1293

Closed
wants to merge 1 commit into from
Closed

Conversation

mishramonalisha76
Copy link
Collaborator

@mishramonalisha76 mishramonalisha76 commented May 17, 2024

Fixes Issue

The issue was when the chats are not decrypted, the image, file content is not a JSON format but is an encrypted string, which gave error when parsed.
So handled the exception in JSON.parse() using try catch.

Video: https://drive.google.com/file/d/1CZepGGMKEFMHU7ICOkehRaR5jAdLpZj8/view?usp=sharing

Changes proposed

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Screenshots

Note to reviewers

Copy link

In the FileCard.tsx file, the FileCard component is missing the position prop in the destructuring of props.

It should be updated like this:

export const FileCard = ({ chat, position, isGroup }: { chat: IMessagePayload; position: number; isGroup: boolean }) => {

In the same file, there's a typo in the comment: "External Packages" should be "External Packages".

In the ImageCard.tsx file, the ImageCard component is missing the position prop in the destructuring of props.

It should be updated like this:

export const ImageCard = ({
  chat,
  position,
  isGroup,
}: {
  chat: IMessagePayload;
  position: number;
  isGroup: boolean;
}) => {

Other than the above-mentioned fixes, the code in both files looks good.

All looks good.

@mishramonalisha76
Copy link
Collaborator Author

not needed, its already fixed by @HarshRajat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant