Merge branch 'develop' into feature/activitypub
This commit is contained in:
commit
94db9ac4db
6 changed files with 81 additions and 6 deletions
|
|
@ -8,7 +8,7 @@ defmodule Pleroma.Web.CommonAPI do
|
|||
def delete(activity_id, user) do
|
||||
with %Activity{data: %{"object" => %{"id" => object_id}}} <- Repo.get(Activity, activity_id),
|
||||
%Object{} = object <- Object.get_by_ap_id(object_id),
|
||||
true <- user.ap_id == object.data["actor"],
|
||||
true <- user.info["is_moderator"] || (user.ap_id == object.data["actor"]),
|
||||
{:ok, delete} <- ActivityPub.delete(object) do
|
||||
{:ok, delete}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -41,7 +41,9 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
|
|||
"profile_image_url_https" => image,
|
||||
"profile_image_url_profile_size" => image,
|
||||
"profile_image_url_original" => image,
|
||||
"rights" => %{},
|
||||
"rights" => %{
|
||||
"delete_others_notice" => !!user.info["is_moderator"]
|
||||
},
|
||||
"screen_name" => user.nickname,
|
||||
"statuses_count" => user_info[:note_count],
|
||||
"statusnet_profile_url" => user.ap_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue