Skip to content

Commit

Permalink
update logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
mo3et committed Aug 22, 2024
1 parent d6f147d commit a335889
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/rpc/conversation/conversaion.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,11 @@ func (c *conversationServer) SetConversations(ctx context.Context, req *pbconver
if err != nil {
return nil, err
}
conversationMap[userID] = conversationList[0]
if len(conversationList) != 0 {
conversationMap[userID] = conversationList[0]
} else {
conversationMap[userID] = &dbModel.Conversation{}
}
}

var conversation dbModel.Conversation
Expand Down

0 comments on commit a335889

Please sign in to comment.