* Feature 🚀 : Ability to delete messages in chat channels - Sending message ID to frontend - Deleting Message - Use pusher to delete message realtime * Minor Bug 🐞: Show message action only for current user - User can delete or edit their own messages * Test cases added * Bug 🐞: Update message id for receiver Message id was not sent to receiver by pusher * Refactoring🛠: Message controller refactoring * Test Cases📝 : Specs for Delete message added * Remove edit button and modify css
This commit is contained in:
parent
7c650dcb1c
commit
c746da3a5e
3 changed files with 4 additions and 6 deletions
|
|
@ -1249,7 +1249,6 @@
|
|||
display: none;
|
||||
justify-content: end;
|
||||
-webkit-justify-content: flex-end;
|
||||
|
||||
}
|
||||
|
||||
.message__actions span {
|
||||
|
|
@ -1257,6 +1256,7 @@
|
|||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
color: var(--theme-secondary-color, $medium-gray);
|
||||
}
|
||||
|
||||
.chatmessage:hover .message__actions {
|
||||
|
|
@ -1287,6 +1287,7 @@
|
|||
border: 2px solid;
|
||||
background: var(--theme-background, #f5f6f7);
|
||||
color: var(--theme-color, $black);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.modal__content h3 {
|
||||
|
|
@ -1305,6 +1306,7 @@
|
|||
padding: 5px 20px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.message__delete__modal__hide {
|
||||
|
|
@ -1314,4 +1316,4 @@
|
|||
.message__delete__button {
|
||||
background: #ff0000;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
|
@ -62,9 +62,6 @@ exports[`<Message /> should render and test snapshot 1`] = `
|
|||
>
|
||||
Delete
|
||||
</span>
|
||||
<span>
|
||||
Edit
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ const Message = ({
|
|||
>
|
||||
Delete
|
||||
</span>
|
||||
<span>Edit</span>
|
||||
</div>
|
||||
) : (
|
||||
' '
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue