From bf9f6718f75872cc228c4b94fd85013b713658bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82?= Date: Thu, 9 Jan 2025 19:53:50 +0100 Subject: [PATCH] Fix object and list inclusion in context --- apps/api/lib/buildel/blocks/chat.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/lib/buildel/blocks/chat.ex b/apps/api/lib/buildel/blocks/chat.ex index f26180a3..266d3087 100644 --- a/apps/api/lib/buildel/blocks/chat.ex +++ b/apps/api/lib/buildel/blocks/chat.ex @@ -868,10 +868,10 @@ defmodule Buildel.Blocks.Chat do String.replace(acc, "{{#{key}}}", value |> to_string()) {key, value}, acc when is_map(value) -> - Jason.encode!(value) + String.replace(acc, "{{#{key}}}", Jason.encode!(value)) {key, value}, acc when is_list(value) -> - Jason.encode!(value) + String.replace(acc, "{{#{key}}}", Jason.encode!(value)) _, acc -> acc