mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
convo successfully changes on convo click
This commit is contained in:
parent
d35ed31b20
commit
c7c50dbbab
9 changed files with 76 additions and 25 deletions
|
|
@ -1,5 +1,5 @@
|
|||
const mongoose = require('mongoose');
|
||||
const { Message } = require('./Message');
|
||||
const { getMessages } = require('./Message');
|
||||
|
||||
const convoSchema = mongoose.Schema({
|
||||
conversationId: {
|
||||
|
|
@ -27,7 +27,7 @@ const Conversation =
|
|||
|
||||
module.exports = {
|
||||
saveConversation: async ({ conversationId, parentMessageId, title }) => {
|
||||
const messages = await Message.find({ conversationId }).exec();
|
||||
const messages = await getMessages({ conversationId });
|
||||
const update = { parentMessageId, messages };
|
||||
if (title) {
|
||||
update.title = title;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue