projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ActivityPub: tags -> tag.
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
utils.ex
diff --git
a/lib/pleroma/web/activity_pub/utils.ex
b/lib/pleroma/web/activity_pub/utils.ex
index 51fac6fe27beacb21552577c5baf7aa8a921ba72..b32b7240eb201b03bc936d215fb67cc7e50ef868 100644
(file)
--- a/
lib/pleroma/web/activity_pub/utils.ex
+++ b/
lib/pleroma/web/activity_pub/utils.ex
@@
-29,7
+29,12
@@
defmodule Pleroma.Web.ActivityPub.Utils do
Enqueues an activity for federation if it's local
"""
def maybe_federate(%Activity{local: true} = activity) do
Enqueues an activity for federation if it's local
"""
def maybe_federate(%Activity{local: true} = activity) do
- Pleroma.Web.Federator.enqueue(:publish, activity)
+ priority = case activity.data["type"] do
+ "Delete" -> 10
+ "Create" -> 1
+ _ -> 5
+ end
+ Pleroma.Web.Federator.enqueue(:publish, activity, priority)
:ok
end
def maybe_federate(_), do: :ok
:ok
end
def maybe_federate(_), do: :ok
@@
-200,7
+205,6
@@
defmodule Pleroma.Web.ActivityPub.Utils do
def make_create_data(params, additional) do
published = params.published || make_date()
def make_create_data(params, additional) do
published = params.published || make_date()
-
%{
"type" => "Create",
"to" => params.to |> Enum.uniq,
%{
"type" => "Create",
"to" => params.to |> Enum.uniq,