aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/user.ex
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-10-21 11:05:09 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-10-21 11:05:09 +0300
commita11a7176d59deafa08a865d6e0950b9b9c540f18 (patch)
tree9a5004f4de7bfa4bf515adaddab65e290d8e38e7 /lib/pleroma/user.ex
parent75da202ab74489af15e086f06810e22211d52d33 (diff)
parent2ebe8c416a72b512feaba87040982da5bcf865cf (diff)
downloadpleroma-a11a7176d59deafa08a865d6e0950b9b9c540f18.tar.gz
Merge remote-tracking branch 'remotes/upstream/develop' into 1304-user-info-deprecation
# Conflicts: # lib/pleroma/user/info.ex # lib/pleroma/web/activity_pub/activity_pub.ex # lib/pleroma/web/activity_pub/transmogrifier.ex
Diffstat (limited to 'lib/pleroma/user.ex')
-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 89f88c74d..00a1df133 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -142,6 +142,9 @@ defmodule Pleroma.User do
def superuser?(%User{local: true, 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