Skip to content

Commit

Permalink
Merge pull request #1202 from glific/bug/newMessage
Browse files Browse the repository at this point in the history
Bug fix for new subscription on status
  • Loading branch information
DigneshGujarathi authored Mar 19, 2021
2 parents 19f7284 + 2bfb203 commit 5155744
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/containers/Chat/ChatSubscription/ChatSubscription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,10 @@ export const ChatSubscription: React.SFC<ChatSubscriptionProps> = ({
return null;
});
}

// this means contact is not cached, so we need to fetch the conversations and add
// it to the cached conversations
// let's also skip fetching contact when we trigger this via group subscriptions
if (!conversationFound && !newMessage.groupId) {
if (!conversationFound && newMessage && !newMessage.groupId) {
getContactQuery({
variables: {
contactOpts: {
Expand Down

0 comments on commit 5155744

Please sign in to comment.