user: implement User.invisible?/1
This commit is contained in:
parent
1469a084d4
commit
95871cb462
2 changed files with 17 additions and 0 deletions
|
|
@ -88,6 +88,9 @@ defmodule Pleroma.User do
|
|||
def superuser?(%User{local: true, info: %User.Info{is_moderator: true}}), do: true
|
||||
def superuser?(_), do: false
|
||||
|
||||
def invisible?(%User{info: %User.Info{invisible: true}}), do: true
|
||||
def invisible?(_), do: false
|
||||
|
||||
def avatar_url(user, options \\ []) do
|
||||
case user.avatar do
|
||||
%{"url" => [%{"href" => href} | _]} -> href
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue