Skip to content

Commit

Permalink
fix: fixed chats not updating in real time for w2w
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausMikhaelson committed Dec 19, 2023
1 parent e021be9 commit b698948
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const ChatViewList: React.FC<IChatViewListProps> = (

//moniters socket changes
useEffect(() => {
if (checkIfSameChat(messagesSinceLastConnection, account!, chatId)) {
if (checkIfSameChat(messagesSinceLastConnection, account!, chatId.includes(":") ? chatId.split(":")[1] : chatId)) {
const updatedChatFeed = chatFeed;
updatedChatFeed.msg = messagesSinceLastConnection;
if (!Object.keys(messages || {}).length) {
Expand All @@ -150,7 +150,6 @@ export const ChatViewList: React.FC<IChatViewListProps> = (
[messagesSinceLastConnection],
false
);

setFilteredMessages(newChatViewList as IMessageIPFSWithCID[]);
}
setChatStatusText('');
Expand Down

0 comments on commit b698948

Please sign in to comment.