MastoAPI: Don't break on missing users.

This commit is contained in:
lain 2019-01-16 15:13:09 +01:00
commit 943324b661
4 changed files with 57 additions and 14 deletions

View file

@ -1040,4 +1040,14 @@ defmodule Pleroma.User do
@strict_local_nickname_regex
end
end
def 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
end