Fixes here and there
This commit is contained in:
@@ -70,14 +70,17 @@ export default function AppSidebar({
|
|||||||
() => {},
|
() => {},
|
||||||
setMessages,
|
setMessages,
|
||||||
(m) => {
|
(m) => {
|
||||||
if (m.from !== chatWith)
|
if (m.from !== chatWith && m.from !== user.id)
|
||||||
toast(`New message from ${m.from}`, {
|
toast(
|
||||||
description: m.contents.slice(0, 80),
|
`New message from ${userList[m.from]?.display_name || m.from}`,
|
||||||
action: {
|
{
|
||||||
label: "View",
|
description: m.contents.slice(0, 80),
|
||||||
onClick: () => router.push(`/chat/${m.from}`),
|
action: {
|
||||||
},
|
label: "View",
|
||||||
});
|
onClick: () => router.push(`/chat/${m.from}`),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
if (onNewMessage) onNewMessage(m);
|
if (onNewMessage) onNewMessage(m);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user