     data = %{presence: %{ids: ids, hash: channel_data, count: count}} |> encode!
     %{event: "pusher_internal:subscription_succeeded",
       channel: channel,
-      data: data } |> encode!
+      data: data} |> encode!
   end
 
   @subscription_error %{event: "pusher:subscription_error", data: %{}} |> encode!

  def subscription_succeeded(channel) when is_binary(channel) do
    %{event: "pusher_internal:subscription_succeeded",
      channel: channel,
      data: %{} } |> encode!
  end

  def subscription_succeeded(%PresenceSubscription{channel: channel, channel_data: channel_data}) do

  """
  @spec pusher_error(binary, integer | nil) :: binary
  def pusher_error(message, code \\ nil) do
    %{event: "pusher:error", data: %{message: message, code: code}} |> encode!
  end

  @pong %{event: "pusher:pong", data: %{}} |> encode!
