Implement a feature to allow users to select and report a message. After reporting a message, prompt the user to ask if they want to block the other user. This feature will include creating a Report class model to manage reported messages.
Requirements
Message Selection:
Allow users to select a message to report.
Provide a user interface for reporting a message.
Report Model:
Create a Report class model to handle reported messages.
Include necessary fields such as reportId, messageId, reportedBy, reportedUser, reason, and timestamp.
Report Handling:
Implement a method to submit the report to the Firebase database.
Store reported messages in a dedicated collection in Firebase.
User Prompt:
After reporting a message, prompt the user to ask if they want to block the reported user.
Provide an option to block the user, which will add the reported user to the block list of the reporting user.
Blocking Functionality:
Implement a method to block a user by adding them to the block list in the database.
Ensure blocked users cannot send messages to the user who blocked them.
Description
Implement a feature to allow users to select and report a message. After reporting a message, prompt the user to ask if they want to block the other user. This feature will include creating a
Report
class model to manage reported messages.Requirements
Message Selection:
Report Model:
Report
class model to handle reported messages.reportId
,messageId
,reportedBy
,reportedUser
,reason
, andtimestamp
.Report Handling:
User Prompt:
Blocking Functionality: