   alias Romeo.JID
 
   @type t :: %__MODULE__{}
-  defstruct user: "", server: "", resource: ""
+  defstruct user: "", server: "", resource: "", full: ""
 
 
   @doc """

  def bare(jid) when is_binary(jid), do: parse(jid) |> bare
  def bare(%JID{} = jid), do: to_string(%JID{jid | resource: ""})


  @doc """
  Parses a binary string JID into a JID struct.

  def parse(string) do
    case String.split(string, ["@", "/"], parts: 3) do
      [user, server, resource] ->
        %JID{user: user, server: server, resource: resource, full: string}
      [user, server] ->
        %JID{user: user, server: server, full: string}
      [server] ->
        %JID{server: server, full: string}
    end
  end
end
