Bugfix/delete messages via sessionId (#3982)
delete messages via sessionId
This commit is contained in:
parent
a0b4abdd13
commit
01cb3ef20d
|
|
@ -180,6 +180,7 @@ const removeAllChatMessages = async (req: Request, res: Response, next: NextFunc
|
|||
const messages = await utilGetChatMessage({
|
||||
chatflowid,
|
||||
chatTypes,
|
||||
sessionId,
|
||||
startDate,
|
||||
endDate,
|
||||
feedback: isFeedback,
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ const ViewMessagesDialog = ({ show, dialogProps, onCancel }) => {
|
|||
const obj = { chatflowid, isClearFromViewMessageDialog: true }
|
||||
|
||||
let _chatTypeFilter = chatTypeFilter
|
||||
if (typeof chatTypeFilter === 'string') {
|
||||
if (typeof chatTypeFilter === 'string' && chatTypeFilter.startsWith('[') && chatTypeFilter.endsWith(']')) {
|
||||
_chatTypeFilter = JSON.parse(chatTypeFilter)
|
||||
}
|
||||
if (_chatTypeFilter.length === 1) {
|
||||
|
|
@ -255,7 +255,7 @@ const ViewMessagesDialog = ({ show, dialogProps, onCancel }) => {
|
|||
}
|
||||
|
||||
let _feedbackTypeFilter = feedbackTypeFilter
|
||||
if (typeof feedbackTypeFilter === 'string') {
|
||||
if (typeof feedbackTypeFilter === 'string' && feedbackTypeFilter.startsWith('[') && feedbackTypeFilter.endsWith(']')) {
|
||||
_feedbackTypeFilter = JSON.parse(feedbackTypeFilter)
|
||||
}
|
||||
if (_feedbackTypeFilter.length === 1) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue