@helpway/react 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4223,7 +4223,9 @@ function ConversationView({ conversationId }) {
4223
4223
  const hasAiReply = items.some(
4224
4224
  (it) => it.type === "message" && Boolean(it.aiAgentId)
4225
4225
  );
4226
- const needsEmailPostReply = !!agentConfig?.requireVisitorEmail && !visitorContact?.email && hasVisitorMessage && hasAiReply;
4226
+ const visitorOwnEmail = useWidgetStore((s) => s.visitor?.email);
4227
+ const hasEmail = !!visitorContact?.email || !!visitorOwnEmail;
4228
+ const needsEmailPostReply = !!agentConfig?.requireVisitorEmail && !hasEmail && hasVisitorMessage && hasAiReply;
4227
4229
  const needsEmail = needsEmailPostReply || !!emailGateConvId;
4228
4230
  if (isLoading && items.length === 0) {
4229
4231
  return /* @__PURE__ */ jsx13("div", { className: "hw-messages", children: /* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-messages", children: [