Update ChatDetail.tsx

This commit is contained in:
NotII
2025-03-24 00:30:57 +00:00
parent 7234acc0d4
commit 37d4d0930c

View File

@@ -268,7 +268,7 @@ export default function ChatDetail({ chatId }: { chatId: string }) {
// Play notification sound if there are new buyer messages // Play notification sound if there are new buyer messages
if (hasNewMessages) { if (hasNewMessages) {
const newMessages = response.messages.slice(messages.length); const newMessages = response.messages.slice(messages.length);
const hasNewBuyerMessages = newMessages.some(msg => msg.sender === 'buyer'); const hasNewBuyerMessages = newMessages.some((msg: Message) => msg.sender === 'buyer');
if (hasNewBuyerMessages) { if (hasNewBuyerMessages) {
playNotificationSound(); playNotificationSound();