mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-01 03:46:44 +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}
|
||||
end)
|
||||
|> Multi.run(:subscribe, fn _repo, %{topic: topic} ->
|
||||
create_subscription(topic, attribution[:user])
|
||||
end)
|
||||
|> Repo.isolated_transaction(:serializable)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue