Web.CommonAPI: Add local-only posts
A post is local-only when it contains a ️ (👁️) at the end. This is from glitch-soc
This commit is contained in:
parent
3e54b79a06
commit
1cd33aa8cd
|
@ -124,14 +124,16 @@ defmodule Pleroma.Web.CommonAPI do
|
||||||
|> Enum.reduce(%{}, fn {name, file}, acc ->
|
|> Enum.reduce(%{}, fn {name, file}, acc ->
|
||||||
Map.put(acc, name, "#{Pleroma.Web.Endpoint.static_url()}#{file}")
|
Map.put(acc, name, "#{Pleroma.Web.Endpoint.static_url()}#{file}")
|
||||||
end)
|
end)
|
||||||
) do
|
),
|
||||||
|
local_only <- !!(String.last(status) == "👁️") do
|
||||||
res =
|
res =
|
||||||
ActivityPub.create(%{
|
ActivityPub.create(%{
|
||||||
to: to,
|
to: to,
|
||||||
actor: user,
|
actor: user,
|
||||||
context: context,
|
context: context,
|
||||||
object: object,
|
object: object,
|
||||||
additional: %{"cc" => cc}
|
additional: %{"cc" => cc},
|
||||||
|
local: local_only
|
||||||
})
|
})
|
||||||
|
|
||||||
res
|
res
|
||||||
|
|
Loading…
Reference in New Issue