Skip to content

Commit

Permalink
Update lib/broadway_cloud_pub_sub/pull_client.ex
Browse files Browse the repository at this point in the history
Co-authored-by: Max Wilson <io@maxwilson.dev>
  • Loading branch information
josevalim and mwilsoncoding authored Jun 19, 2024
1 parent aa30999 commit e0b1967
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/broadway_cloud_pub_sub/pull_client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ defmodule BroadwayCloudPubSub.PullClient do
%{message | "data" => Base.decode64!(encoded_data)}
end

defp decode_message(%{"data" => nil} = message), do: message
defp decode_message(message) when is_map(message) and not is_map_key(message, "data"), do: message

defp headers(config) do
Expand Down

0 comments on commit e0b1967

Please sign in to comment.