diff --git a/src/components/Chat/Chat.tsx b/src/components/Chat/Chat.tsx index a96bebe..5f27532 100644 --- a/src/components/Chat/Chat.tsx +++ b/src/components/Chat/Chat.tsx @@ -177,6 +177,7 @@ const Chat = ({ const chatbotMessageProps = { ...messageObject, + payload: messageObject.payload, setState, state, customComponents, diff --git a/src/components/ChatbotMessage/ChatbotMessage.tsx b/src/components/ChatbotMessage/ChatbotMessage.tsx index e971ab7..72a318a 100644 --- a/src/components/ChatbotMessage/ChatbotMessage.tsx +++ b/src/components/ChatbotMessage/ChatbotMessage.tsx @@ -10,6 +10,7 @@ import { ICustomComponents, ICustomStyles } from '../../interfaces/IConfig'; interface IChatbotMessageProps { message: string; + payload?: any; withAvatar?: boolean; loading?: boolean; messages: any[]; @@ -21,6 +22,7 @@ interface IChatbotMessageProps { } const ChatbotMessage = ({ message, + payload, withAvatar = true, loading, messages, @@ -96,6 +98,7 @@ const ChatbotMessage = ({ condition={!!customComponents?.botChatMessage} show={callIfExists(customComponents?.botChatMessage, { message, + payload, loader: , })} elseShow={