mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-24 20:57:14 +01:00
subscribe user on topic creation
This commit is contained in:
parent
92d53f6450
commit
831580ac3d
1 changed files with 3 additions and 0 deletions
|
@ -62,6 +62,9 @@ defmodule Philomena.Topics do
|
||||||
|
|
||||||
{:ok, count}
|
{:ok, count}
|
||||||
end)
|
end)
|
||||||
|
|> Multi.run(:subscribe, fn _repo, %{topic: topic} ->
|
||||||
|
create_subscription(topic, attribution[:user])
|
||||||
|
end)
|
||||||
|> Repo.isolated_transaction(:serializable)
|
|> Repo.isolated_transaction(:serializable)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue