);
case "interactive": {
// Customer tapped a reply button or list row on a message the bot
// sent. We show the tapped option's title (already in content_text,
// set by parseMessageContent in the webhook) with a small affordance
// so agents reading the inbox can tell at a glance that this is a
// tap rather than the customer typing the same words.
return (
{t("buttonReply")}
{message.content_text || t("interactiveReply")}
);
}
default:
return (
{message.content_text || t("unsupported")}
);
}
}
export function MessageBubble({
message,
reply,
reactions,
currentUserId,
onToggleReaction,
}: MessageBubbleProps) {
const t = useTranslations("Inbox.bubble");
const isAgent = message.sender_type === "agent" || message.sender_type === "bot";
const time = format(new Date(message.created_at), "HH:mm");
// Row alignment + width cap are owned by so its hover
// group matches the bubble's content area, not the full row.
return (