mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 19:59:20 +00:00
feat: handle group messages
This commit is contained in:
@@ -88,6 +88,7 @@ const NotificationsPopOver = () => {
|
||||
socket.on("appMessage", data => {
|
||||
if (
|
||||
data.action === "create" &&
|
||||
!data.message.read &&
|
||||
(data.ticket.userId === userId || !data.ticket.userId)
|
||||
) {
|
||||
setNotifications(prevState => {
|
||||
@@ -103,7 +104,8 @@ const NotificationsPopOver = () => {
|
||||
(ticketIdRef.current &&
|
||||
data.message.ticketId === ticketIdRef.current &&
|
||||
document.visibilityState === "visible") ||
|
||||
(data.ticket.userId && data.ticket.userId !== userId)
|
||||
(data.ticket.userId && data.ticket.userId !== userId) ||
|
||||
data.ticket.isGroup
|
||||
)
|
||||
return;
|
||||
else {
|
||||
|
||||
@@ -103,7 +103,7 @@ const TicketActionButtons = ({ ticket }) => {
|
||||
color="primary"
|
||||
onClick={e => handleUpdateTicketStatus(e, "open", userId)}
|
||||
>
|
||||
ACCEPT
|
||||
{i18n.t("messagesList.header.buttons.accept")}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -243,7 +243,8 @@ const messages = {
|
||||
buttons: {
|
||||
return: "Return",
|
||||
resolve: "Resolve",
|
||||
reopen: "Reopen",
|
||||
reopen: "Reopen",
|
||||
accept: "Accept"
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -245,6 +245,7 @@ const messages = {
|
||||
return: "Retornar",
|
||||
resolve: "Resolver",
|
||||
reopen: "Reabrir",
|
||||
accept: "Aceitar",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user