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

feat: added "isMessageEditableOrDeletable" in sockets/editMessage.js #732

Conversation

amishabaraskar
Copy link

Fixes Issue

fixes #722
My PR closes #722

πŸ‘¨β€πŸ’» Changes proposed(What did you do ?)

The sockets/editMessages.js was not receiving "isMessageEditableOrDeletable" and "messageWasEditedSuccessfully" from client/src/lib/chatSocket.js

I have added the isMessageEditableOrDeletable function in sockets/editMessage.js. It will check if the time of message is less than 15 minutes or not. I have passed the message "time" attribute from Chat.jsx to chatSocket.js to editMesage.js and removed isEdited from chatSocket.js and editMessage.js as Chat.jsx was not sending isEdited attribute to chatSocket.js .

I have removed the use of "messageWasEditedSuccessfully" from sockets/editMessage.js as it is not receiving any method from chatSocket.js

βœ”οΈ Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR is clear and explains the approach.

Note to reviewers

πŸ“· Screenshots

Copy link

vercel bot commented Nov 29, 2024

@amishabaraskar is attempting to deploy a commit to the dunsin's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Owner

@Dun-sin Dun-sin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amishabaraskar think you did this PR out of rush and didn't take your time, nothing here fixes the issue and actually causes more problems.

Thanks for wanting to contribute tho, if you feel you can contribute properly in the future and have more time, do come back

@Dun-sin Dun-sin closed this Nov 29, 2024
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.

[BUG] Editing Message not working and causing app to crash
2 participants