projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extract apps actions from `MastodonAPIController` to `AppController`
[akkoma]
/
lib
/
pleroma
/
web
/
salmon
/
salmon.ex
diff --git
a/lib/pleroma/web/salmon/salmon.ex
b/lib/pleroma/web/salmon/salmon.ex
index 9b01ebcc642ea30acc7f09024bc5f7c9c0fea58b..8ba7380c0902b9df9a30a72f1efe5ee02cf64532 100644
(file)
--- a/
lib/pleroma/web/salmon/salmon.ex
+++ b/
lib/pleroma/web/salmon/salmon.ex
@@
-170,6
+170,15
@@
defmodule Pleroma.Web.Salmon do
end
end
end
end
+ def publish_one(%{recipient_id: recipient_id} = params) do
+ recipient = User.get_cached_by_id(recipient_id)
+
+ params
+ |> Map.delete(:recipient_id)
+ |> Map.put(:recipient, recipient)
+ |> publish_one()
+ end
+
def publish_one(_), do: :noop
@supported_activities [
def publish_one(_), do: :noop
@supported_activities [
@@
-218,7
+227,7
@@
defmodule Pleroma.Web.Salmon do
Logger.debug(fn -> "Sending Salmon to #{remote_user.ap_id}" end)
Publisher.enqueue_one(__MODULE__, %{
Logger.debug(fn -> "Sending Salmon to #{remote_user.ap_id}" end)
Publisher.enqueue_one(__MODULE__, %{
- recipient
: remote_user
,
+ recipient
_id: remote_user.id
,
feed: feed,
unreachable_since: reachable_urls_metadata[remote_user.info.salmon]
})
feed: feed,
unreachable_since: reachable_urls_metadata[remote_user.info.salmon]
})