projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'release/1.1.6' into 'stable'
[akkoma]
/
lib
/
pleroma
/
user.ex
diff --git
a/lib/pleroma/user.ex
b/lib/pleroma/user.ex
index 617f160e0e547159237ff64bdb84e59368c64add..f5d3245dcf3830d4749ba0227507b09195fdd2dd 100644
(file)
--- a/
lib/pleroma/user.ex
+++ b/
lib/pleroma/user.ex
@@
-70,6
+70,8
@@
defmodule Pleroma.User do
def auth_active?(%User{info: %User.Info{confirmation_pending: true}}),
do: !Pleroma.Config.get([:instance, :account_activation_required])
def auth_active?(%User{info: %User.Info{confirmation_pending: true}}),
do: !Pleroma.Config.get([:instance, :account_activation_required])
+ def auth_active?(%User{info: %User.Info{deactivated: true}}), do: false
+
def auth_active?(%User{}), do: true
def visible_for?(user, for_user \\ nil)
def auth_active?(%User{}), do: true
def visible_for?(user, for_user \\ nil)
@@
-718,7
+720,7
@@
defmodule Pleroma.User do
set: [
info:
fragment(
set: [
info:
fragment(
- "jsonb_set(?, '{note_count}', ((?->>'note_count')::int + 1)::varchar::jsonb, true)",
+ "
safe_
jsonb_set(?, '{note_count}', ((?->>'note_count')::int + 1)::varchar::jsonb, true)",
u.info,
u.info
)
u.info,
u.info
)
@@
-739,7
+741,7
@@
defmodule Pleroma.User do
set: [
info:
fragment(
set: [
info:
fragment(
- "jsonb_set(?, '{note_count}', (greatest(0, (?->>'note_count')::int - 1))::varchar::jsonb, true)",
+ "
safe_
jsonb_set(?, '{note_count}', (greatest(0, (?->>'note_count')::int - 1))::varchar::jsonb, true)",
u.info,
u.info
)
u.info,
u.info
)
@@
-812,7
+814,7
@@
defmodule Pleroma.User do
set: [
info:
fragment(
set: [
info:
fragment(
- "jsonb_set(?, '{follower_count}', ?::varchar::jsonb, true)",
+ "
safe_
jsonb_set(?, '{follower_count}', ?::varchar::jsonb, true)",
u.info,
s.count
)
u.info,
s.count
)