Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/pinned-posts
This commit is contained in:
commit
0c750bc432
7 changed files with 76 additions and 3 deletions
|
|
@ -94,11 +94,27 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
|
|||
ap_id == "https://www.w3.org/ns/activitystreams#Public" ->
|
||||
nil
|
||||
|
||||
user = User.get_cached_by_ap_id(ap_id) ->
|
||||
user
|
||||
|
||||
user = User.get_by_guessed_nickname(ap_id) ->
|
||||
user
|
||||
|
||||
true ->
|
||||
User.get_cached_by_ap_id(ap_id)
|
||||
error_user(ap_id)
|
||||
end
|
||||
end
|
||||
|
||||
defp error_user(ap_id) do
|
||||
%User{
|
||||
name: ap_id,
|
||||
ap_id: ap_id,
|
||||
info: %User.Info{},
|
||||
nickname: "erroruser@example.com",
|
||||
inserted_at: NaiveDateTime.utc_now()
|
||||
}
|
||||
end
|
||||
|
||||
def render("index.json", opts) do
|
||||
context_ids = collect_context_ids(opts.activities)
|
||||
users = collect_users(opts.activities)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue