fssa-batch3 / fssa-batch3/sec_a_susikumar.pitchaimuthu__corejava_project_2
Chat Module | Update Feature
- Dominant language
- Java
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
User Story
As a user, you should be able to edit or modify your sent chat with a valid message ID and user ID. First, the system will check if there is a chat with this ID in the database and whether the message is associated with this user ID or not. If the message ID is invalid, the error message will be "Invalid message ID details." If the user ID is not associated with this message ID, the error message will be "Invalid user ID for the chat." If the chat and message IDs are valid and associated with the user, the system will update the message. Otherwise, it will throw an "Invalid chat update details" error.
### DAO:
- [x] updateChat()
### Service:
- [x] updateChat()
### Service Tests:
- [x] testUpdateChatSuccess()
## Flow
```mermaid
graph TD
A[Start]
B(Check if message ID is valid)
C[(Check if user ID is associated with message ID)]
D(Update the message)
E(Invalid message ID details)
F(Invalid user ID for the chat)
G(Store Chat details)
A -->|User ID, Message ID| B
B -->|Valid| C
B -->|Invalid| E
C -->|Associated| D
C -->|Not Associated| F
D -->|Message Updated| G --> END
F -->|Invalid User ID| END
E -->|Invalid Message ID| END
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.