From 2df981e1297d090642f481cdb44acf22f011f0c1 Mon Sep 17 00:00:00 2001 From: LBang98 Date: Tue, 10 Sep 2024 11:07:56 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B1=84=ED=8C=85=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/friend-list/FriendList.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/friend-list/FriendList.js b/src/components/friend-list/FriendList.js index 0ca60e0..0eef593 100644 --- a/src/components/friend-list/FriendList.js +++ b/src/components/friend-list/FriendList.js @@ -107,6 +107,11 @@ export default function FriendList() { timestamp: message.timestamp } ]); + + // 메시지 전송 후, loadMessages 함수 실행 + if (oneFriend && oneFriend.chatRoomId) { + loadMessages(oneFriend.chatRoomId); + } } }; @@ -174,7 +179,9 @@ export default function FriendList() { ...prevMessages, { senderId: userData.user_id, content: messageContent, timestamp: new Date().toISOString() } ]); + } + } // 초대 수락 핸들러