diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-05-06 14:09:39 +0200 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-05-06 14:09:39 +0200 |
commit | bda389d7d942b7e90ffb519bc680a424a8400e2f (patch) | |
tree | 56296b4b848ce82e0a42fff916b43f6f375b01d2 /lib/pleroma/web/websub | |
parent | 9cafb67fc177ace3af176a86366ae676b89ea368 (diff) | |
download | pleroma-bda389d7d942b7e90ffb519bc680a424a8400e2f.tar.gz |
Subscribe to remote users on following.
Diffstat (limited to 'lib/pleroma/web/websub')
-rw-r--r-- | lib/pleroma/web/websub/websub.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/websub/websub.ex b/lib/pleroma/web/websub/websub.ex index a5abc303c..7c8efa917 100644 --- a/lib/pleroma/web/websub/websub.ex +++ b/lib/pleroma/web/websub/websub.ex @@ -126,7 +126,7 @@ defmodule Pleroma.Web.Websub do topic = subscribed.info["topic"] # FIXME: Race condition, use transactions {:ok, subscription} = with subscription when not is_nil(subscription) <- Repo.get_by(WebsubClientSubscription, topic: topic) do - subscribers = [subscriber.ap_id, subscription.subscribers] |> Enum.uniq + subscribers = [subscriber.ap_id | subscription.subscribers] |> Enum.uniq change = Ecto.Changeset.change(subscription, %{subscribers: subscribers}) Repo.update(change) else _e -> |