Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33103860
suggestion_view.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
753 B
Referenced Files
None
Subscribers
None
suggestion_view.ex
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Web.MastodonAPI.SuggestionView
do
use
Pleroma.Web
,
:view
alias
Pleroma.Web.MastodonAPI.AccountView
@source_types
[
:staff
,
:global
,
:past_interactions
]
def
render
(
"index.json"
,
%{
users
:
users
}
=
opts
)
do
Enum
.
map
(
users
,
fn
user
->
opts
=
opts
|>
Map
.
put
(
:user
,
user
)
|>
Map
.
delete
(
:users
)
render
(
"show.json"
,
opts
)
end
)
end
def
render
(
"show.json"
,
%{
source
:
source
,
user
:
_user
}
=
opts
)
when
source
in
@source_types
do
%{
source
:
source
,
account
:
AccountView
.
render
(
"show.json"
,
opts
)
}
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Tue, Jan 20, 2:03 PM (47 m, 42 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
927776
Default Alt Text
suggestion_view.ex (753 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment