diff --git a/lib/broadway_cloud_pub_sub/pull_client.ex b/lib/broadway_cloud_pub_sub/pull_client.ex index 96a3468..20e379d 100644 --- a/lib/broadway_cloud_pub_sub/pull_client.ex +++ b/lib/broadway_cloud_pub_sub/pull_client.ex @@ -172,7 +172,7 @@ defmodule BroadwayCloudPubSub.PullClient do end defp decode_message(%{"data" => nil} = message), do: message - defp decode_message(%{"attributes" => %{"payloadFormat" => "NONE"}} = message), do: message + defp decode_message(%{} = message) when not is_map_key(message, "data"), do: message defp headers(config) do token = get_token(config)