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

Feature Request: Implement Method to Unsend Message #170

Closed
Alpha17-2 opened this issue Jun 13, 2024 · 0 comments · Fixed by #177
Closed

Feature Request: Implement Method to Unsend Message #170

Alpha17-2 opened this issue Jun 13, 2024 · 0 comments · Fixed by #177
Labels
Feature required New feature or request good first issue Good for newcomers

Comments

@Alpha17-2
Copy link
Collaborator

Description

Implement a feature that allows users to unsend a message in a chat. This will involve removing the message from the database based on the provided message ID and chat ID. This feature will enhance user control over their sent messages.

Requirements

  1. Unsend Message Method:

    • Create a method that accepts a message ID and a chat ID.
    • The method should delete the specified message from the database.
  2. Database Structure:

    • Ensure the method correctly navigates the database structure to locate the message within the chat's subcollection.
  3. Error Handling:

    • Handle cases where the message or chat does not exist.
    • Provide appropriate feedback for success or failure of the operation.

Implementation Details

  1. Method Definition:

    • Define a method unsendMessage that takes messageId and chatId as parameters.
  2. Database Operations:

    • Use the chat ID to locate the specific chat document.
    • Use the message ID to locate and delete the message within the chat's subcollection.
  3. Feedback Mechanism:

    • Return a success or failure response based on the outcome of the database operation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature required New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant