- def create(to, actor, context, object, additional \\ %{}, published \\ nil, local \\ true) do
- with create_data <- make_create_data(%{to: to, actor: actor, published: published, context: context, object: object}, additional),
- {:ok, activity} <- insert(create_data, local),
- :ok <- maybe_federate(activity) do
- if activity.data["type"] == "Create" and Enum.member?(activity.data["to"], "https://www.w3.org/ns/activitystreams#Public") do
+ def stream_out(activity) do
+ if activity.data["type"] in ["Create", "Announce"] do
+ Pleroma.Web.Streamer.stream("user", activity)
+ if Enum.member?(activity.data["to"], "https://www.w3.org/ns/activitystreams#Public") do