diff --git a/lib/broadway_cloud_pub_sub/pull_client.ex b/lib/broadway_cloud_pub_sub/pull_client.ex index 140da35..b22ed89 100644 --- a/lib/broadway_cloud_pub_sub/pull_client.ex +++ b/lib/broadway_cloud_pub_sub/pull_client.ex @@ -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