Skip to content

Commit

Permalink
Merge pull request #936 from ethereum-push-notification-service/935-r…
Browse files Browse the repository at this point in the history
…ealtime-chat-issue

fix: fixed chats not updating in real time for w2w
  • Loading branch information
KlausMikhaelson authored Jan 4, 2024
2 parents ea84356 + b698948 commit 3dcb6b5
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 3dcb6b5

Please sign in to comment.