Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule CodeCorps.Emails.MessageInitiatedByProjectEmail do
WebClient
}

@spec create(User.t, String.t) :: Bamboo.Email.t
@spec create(Message.t, Conversation.t) :: Bamboo.Email.t
def create(
%Message{project: %Project{} = project},
%Conversation{user: %User{} = user} = conversation) do
Expand Down
2 changes: 1 addition & 1 deletion lib/code_corps/messages/messages.ex
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ defmodule CodeCorps.Messages do
@doc ~S"""
Gets a `CodeCorps.ConversationPart` record
"""
@spec get_part(integer) :: Conversation.t
@spec get_part(integer) :: ConversationPart.t
def get_part(id) do
ConversationPart |> Repo.get(id)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/code_corps/policy/helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ defmodule CodeCorps.Policy.Helpers do
@doc """
Retrieves conversation from associated record
"""
@spec get_conversation(Changeset.t() | ConversationPart.t() | map) :: Message.t()
@spec get_conversation(Changeset.t() | ConversationPart.t() | map) :: Conversation.t()
def get_conversation(%ConversationPart{conversation_id: conversation_id}), do: Repo.get(Conversation, conversation_id)
def get_conversation(%{"conversation_id" => conversation_id}), do: Repo.get(Conversation, conversation_id)
def get_conversation(%Changeset{changes: %{conversation_id: conversation_id}}), do: Repo.get(Conversation, conversation_id)
Expand Down