Skip to content

Commit

Permalink
Merge branch 'pr/538'
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzCrazyKns committed Jan 5, 2025
2 parents 5a648f3 + d18e88a commit 0f6b3c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/websocket/messageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { Embeddings } from '@langchain/core/embeddings';
import logger from '../utils/logger';
import db from '../db';
import { chats, messages as messagesSchema } from '../db/schema';
import { eq, asc, gt } from 'drizzle-orm';
import { eq, asc, gt, and } from 'drizzle-orm';
import crypto from 'crypto';
import { getFileDetails } from '../utils/files';
import MetaSearchAgent, {
Expand Down Expand Up @@ -238,7 +238,7 @@ export const handleMessage = async (
} else {
await db
.delete(messagesSchema)
.where(gt(messagesSchema.id, messageExists.id))
.where(and(gt(messagesSchema.id, messageExists.id), eq(messagesSchema.chatId, parsedMessage.chatId)))
.execute();
}
} catch (err) {
Expand Down

0 comments on commit 0f6b3c2

Please sign in to comment.