mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
Bugfix/delete messages via sessionId (#3982)
delete messages via sessionId
This commit is contained in:
@@ -180,6 +180,7 @@ const removeAllChatMessages = async (req: Request, res: Response, next: NextFunc
|
|||||||
const messages = await utilGetChatMessage({
|
const messages = await utilGetChatMessage({
|
||||||
chatflowid,
|
chatflowid,
|
||||||
chatTypes,
|
chatTypes,
|
||||||
|
sessionId,
|
||||||
startDate,
|
startDate,
|
||||||
endDate,
|
endDate,
|
||||||
feedback: isFeedback,
|
feedback: isFeedback,
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ const ViewMessagesDialog = ({ show, dialogProps, onCancel }) => {
|
|||||||
const obj = { chatflowid, isClearFromViewMessageDialog: true }
|
const obj = { chatflowid, isClearFromViewMessageDialog: true }
|
||||||
|
|
||||||
let _chatTypeFilter = chatTypeFilter
|
let _chatTypeFilter = chatTypeFilter
|
||||||
if (typeof chatTypeFilter === 'string') {
|
if (typeof chatTypeFilter === 'string' && chatTypeFilter.startsWith('[') && chatTypeFilter.endsWith(']')) {
|
||||||
_chatTypeFilter = JSON.parse(chatTypeFilter)
|
_chatTypeFilter = JSON.parse(chatTypeFilter)
|
||||||
}
|
}
|
||||||
if (_chatTypeFilter.length === 1) {
|
if (_chatTypeFilter.length === 1) {
|
||||||
@@ -255,7 +255,7 @@ const ViewMessagesDialog = ({ show, dialogProps, onCancel }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let _feedbackTypeFilter = feedbackTypeFilter
|
let _feedbackTypeFilter = feedbackTypeFilter
|
||||||
if (typeof feedbackTypeFilter === 'string') {
|
if (typeof feedbackTypeFilter === 'string' && feedbackTypeFilter.startsWith('[') && feedbackTypeFilter.endsWith(']')) {
|
||||||
_feedbackTypeFilter = JSON.parse(feedbackTypeFilter)
|
_feedbackTypeFilter = JSON.parse(feedbackTypeFilter)
|
||||||
}
|
}
|
||||||
if (_feedbackTypeFilter.length === 1) {
|
if (_feedbackTypeFilter.length === 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user