From 55e51eabd76003c70d16ba075095f4ecaea3a3b9 Mon Sep 17 00:00:00 2001 From: Nico Arqueros <1622112+nicarq@users.noreply.github.com> Date: Fri, 8 Sep 2023 21:46:34 +0800 Subject: [PATCH] fixed inbox test after switching sorting of messages --- shinkai-app/src/components/ChatMessages.tsx | 4 ---- tests/db_inbox_tests.rs | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/shinkai-app/src/components/ChatMessages.tsx b/shinkai-app/src/components/ChatMessages.tsx index 5598ed961..c159c5a90 100644 --- a/shinkai-app/src/components/ChatMessages.tsx +++ b/shinkai-app/src/components/ChatMessages.tsx @@ -40,10 +40,6 @@ const ChatMessages: React.FC = ({ deserializedId }) => { const interval = setInterval(() => { const lastMessage = reduxMessages[reduxMessages.length - 1]; const hashKey = calculateMessageHash(lastMessage); - console.log("Debug> Last Message:", lastMessage); - console.log("Debug> Last Message Content:", extractContent(lastMessage.body)); - console.log("Debug> Hash Key from above:", hashKey); - console.log("Debug> Last key (stored):", mostRecentKey); dispatch( getLastUnreadMessagesFromInbox(deserializedId, 10, mostRecentKey, setupDetailsState) ); diff --git a/tests/db_inbox_tests.rs b/tests/db_inbox_tests.rs index 5681cb854..84c2b54c5 100644 --- a/tests/db_inbox_tests.rs +++ b/tests/db_inbox_tests.rs @@ -200,7 +200,7 @@ fn db_inbox() { assert_eq!(last_unread_messages_inbox.len(), 2); assert_eq!( last_unread_messages_inbox[0].clone().get_message_content().unwrap(), - "Hello World 3".to_string() + "Hello World".to_string() ); assert_eq!( last_unread_messages_inbox[1].clone().get_message_content().unwrap(), @@ -217,7 +217,7 @@ fn db_inbox() { assert_eq!(last_unread_messages_inbox_page2.len(), 1); assert_eq!( last_unread_messages_inbox_page2[0].clone().get_message_content().unwrap(), - "Hello World".to_string() + "Hello World 3".to_string() ); // check pagination for inbox messages