projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e5b156
)
user: use pattern matching to determine if user is local or remote instead of the...
author
William Pitcock
<nenolod@dereferenced.org>
Wed, 9 Jan 2019 04:46:03 +0000
(
04:46
+0000)
committer
William Pitcock
<nenolod@dereferenced.org>
Wed, 9 Jan 2019 06:02:18 +0000
(06:02 +0000)
lib/pleroma/user.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/user.ex
b/lib/pleroma/user.ex
index 85d0f9fce297d8ba6b97c35d3cf7c93615a16b4e..ce909601d062f87ab285cb63774cd393186a13f4 100644
(file)
--- a/
lib/pleroma/user.ex
+++ b/
lib/pleroma/user.ex
@@
-49,7
+49,8
@@
defmodule Pleroma.User do
!Pleroma.Config.get([:instance, :account_activation_required])
end
- def remote_or_auth_active?(%User{} = user), do: !user.local || auth_active?(user)
+ def remote_or_auth_active?(%User{local: false}), do: true
+ def remote_or_auth_active?(%User{local: true} = user), do: auth_active?(user)
def visible_for?(%User{} = user, for_user \\ nil) do
User.remote_or_auth_active?(user) || (for_user && for_user.id == user.id) ||