Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F21908495
report.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
767 B
Referenced Files
None
Subscribers
None
report.ex
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Web.AdminAPI.Report
do
alias
Pleroma.Activity
alias
Pleroma.User
def
extract_report_info
(
%{
data
:
%{
"actor"
=>
actor
,
"object"
=>
[
account_ap_id
|
status_ap_ids
]}}
=
report
)
do
user
=
User
.
get_cached_by_ap_id
(
actor
)
account
=
User
.
get_cached_by_ap_id
(
account_ap_id
)
statuses
=
Enum
.
map
(
status_ap_ids
,
fn
act
when
is_map
(
act
)
->
Activity
.
get_by_ap_id_with_object
(
act
[
"id"
])
act
when
is_binary
(
act
)
->
Activity
.
get_by_ap_id_with_object
(
act
)
end
)
%{
report
:
report
,
user
:
user
,
account
:
account
,
statuses
:
statuses
}
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sun, Dec 28, 1:43 AM (1 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
764204
Default Alt Text
report.ex (767 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment