mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-18 06:57:59 +01:00
9 lines
No EOL
229 B
Elixir
9 lines
No EOL
229 B
Elixir
defmodule PhilomenaWeb.ConversationView do
|
|
use PhilomenaWeb, :view
|
|
|
|
def other_party(user_id, %{to_id: user_id} = conversation),
|
|
do: conversation.from
|
|
|
|
def other_party(_user_id, conversation),
|
|
do: conversation.to
|
|
end |