Conversation: Rename function to better express what it does.
This commit is contained in:
parent
a49c92f6ae
commit
e4a01d253e
|
@ -40,7 +40,7 @@ def get_for_ap_id(ap_id) do
|
||||||
Repo.get_by(__MODULE__, ap_id: ap_id)
|
Repo.get_by(__MODULE__, ap_id: ap_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def maybe_set_recipients(participation, activity) do
|
def maybe_create_recipientships(participation, activity) do
|
||||||
participation = Repo.preload(participation, :recipients)
|
participation = Repo.preload(participation, :recipients)
|
||||||
|
|
||||||
if participation.recipients |> Enum.empty?() do
|
if participation.recipients |> Enum.empty?() do
|
||||||
|
@ -70,7 +70,7 @@ def create_or_bump_for(activity, opts \\ []) do
|
||||||
{:ok, participation} =
|
{:ok, participation} =
|
||||||
Participation.create_for_user_and_conversation(user, conversation, opts)
|
Participation.create_for_user_and_conversation(user, conversation, opts)
|
||||||
|
|
||||||
maybe_set_recipients(participation, activity)
|
maybe_create_recipientships(participation, activity)
|
||||||
participation
|
participation
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue