mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
load convos on message send & other conditional rendering
This commit is contained in:
parent
2869638cc0
commit
c794287ced
7 changed files with 39 additions and 20 deletions
|
|
@ -27,7 +27,7 @@ const Conversation =
|
|||
|
||||
module.exports = {
|
||||
saveConversation: async ({ conversationId, parentMessageId, title }) => {
|
||||
const messages = await Message.find({ conversationId });
|
||||
const messages = await Message.find({ conversationId }).exec();
|
||||
const update = { parentMessageId, messages };
|
||||
if (title) {
|
||||
update.title = title;
|
||||
|
|
@ -39,7 +39,5 @@ module.exports = {
|
|||
{ new: true, upsert: true }
|
||||
).exec();
|
||||
},
|
||||
getConversations: async () => {
|
||||
return await Conversation.find({}).exec();
|
||||
},
|
||||
getConversations: async () => await Conversation.find({}).exec(),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue