Skip to content

Commit ccc7101

Browse files
committed
🚸 (dify) Only save Conversation ID when not emp…
1 parent 2f84b10 commit ccc7101

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/forge/blocks/difyAi/actions/createChatMessage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createAction, option } from '@typebot.io/forge'
2-
import { isDefined, isEmpty } from '@typebot.io/lib'
2+
import { isDefined, isEmpty, isNotEmpty } from '@typebot.io/lib'
33
import { HTTPError, got } from 'got'
44
import { auth } from '../auth'
55
import { defaultBaseUrl } from '../constants'
@@ -123,7 +123,7 @@ export const createChatMessage = createAction({
123123
if (item === 'Answer')
124124
variables.set(mapping.variableId, convertNonMarkdownLinks(answer))
125125

126-
if (item === 'Conversation ID')
126+
if (item === 'Conversation ID' && isNotEmpty(conversationId))
127127
variables.set(mapping.variableId, conversationId)
128128

129129
if (item === 'Total Tokens')

0 commit comments

Comments
 (0)