Skip to content

Commit

Permalink
fixed inbox test after switching sorting of messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nicarq committed Sep 8, 2023
1 parent 54ee4da commit 55e51ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions shinkai-app/src/components/ChatMessages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ const ChatMessages: React.FC<ChatMessagesProps> = ({ 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)
);
Expand Down
4 changes: 2 additions & 2 deletions tests/db_inbox_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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
Expand Down

0 comments on commit 55e51ea

Please sign in to comment.