aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAriadne Conill <ariadne@dereferenced.org>2019-10-05 20:11:43 +0000
committerAriadne Conill <ariadne@dereferenced.org>2019-10-19 23:21:37 +0000
commit95871cb4628933900f2004a8bece1b929d5525bf (patch)
tree90f5cfc59424770f6627157ead8e83fa66a98257 /lib
parent1469a084d4c95d24619f88c462601570f85ecfa2 (diff)
downloadpleroma-95871cb4628933900f2004a8bece1b929d5525bf.tar.gz
user: implement User.invisible?/1
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/user.ex3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index ec705b8f6..2bbfaa55b 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -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