Commit 35938656 authored by lain's avatar lain
Browse files

Make user keys on usage.

parent e54e592d
defmodule Pleroma.Web.Federator do
alias Pleroma.User
alias Pleroma.Web.WebFinger
require Logger
@websub Application.get_env(:pleroma, :websub)
......@@ -10,6 +11,7 @@ def handle(:publish, activity) do
Logger.debug("Sending #{["id"]} out via websub")
Pleroma.Web.Websub.publish(Pleroma.Web.OStatus.feed_path(actor), actor, activity)
{:ok, actor} = WebFinger.ensure_keys_present(actor)
Logger.debug("Sending #{["id"]} out via salmon")
Pleroma.Web.Salmon.publish(actor, activity)
......@@ -47,6 +47,7 @@ def represent_user(user) do
|> XmlBuilder.to_doc
# This seems a better fit in Salmon
def ensure_keys_present(user) do
info = || %{}
if info["keys"] do
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment