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 #731

Closed
wants to merge 1 commit into from

Conversation

amishabaraskar
Copy link

@amishabaraskar amishabaraskar commented Nov 29, 2024

Fixes Issue

fixes #722
My PR closes #issue_number_here

πŸ‘¨β€πŸ’» 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
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR Compliance Checks

Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section.

Protected Branch

In order to be considered for merging, the pull request changes must not be implemented on the "main" branch. This is described in our Contributing Guide. We are closing this pull request and we would suggest that you implement your changes as described in our Contributing Guide and open a new pull request.

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
1 participant