diff --git a/lib/broadway_cloud_pub_sub/pull_client.ex b/lib/broadway_cloud_pub_sub/pull_client.ex index eb5e120..e87f19a 100644 --- a/lib/broadway_cloud_pub_sub/pull_client.ex +++ b/lib/broadway_cloud_pub_sub/pull_client.ex @@ -167,9 +167,7 @@ defmodule BroadwayCloudPubSub.PullClient do end end - defp decode_message(%{"data" => nil} = message), do: message - - defp decode_message(%{"data" => encoded_data} = message) do + defp decode_message(%{"data" => encoded_data} = message) when is_binary(encoded_data) do %{message | "data" => Base.decode64!(encoded_data)} end