Skip to content

Commit

Permalink
handle list and map in metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
breeg554 committed Jan 9, 2025
1 parent 2b4a1d5 commit cf96e5a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/api/lib/buildel/blocks/chat.ex
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,12 @@ defmodule Buildel.Blocks.Chat do
{key, value}, acc when is_binary(value) ->
String.replace(acc, "{{#{key}}}", value |> to_string())

{key, value}, acc when is_map(value) ->
Jason.encode!(value)

{key, value}, acc when is_list(value) ->
Jason.encode!(value)

_, acc ->
acc
end)
Expand Down

0 comments on commit cf96e5a

Please sign in to comment.