projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add native captcha and enable it by default.
[akkoma]
/
lib
/
pleroma
/
object.ex
diff --git
a/lib/pleroma/object.ex
b/lib/pleroma/object.ex
index 3fa407931e3bd43d8fba928852232f75f2d09192..bf37b28a7ac38fd2dfd7e34d48487f1d4b9e3579 100644
(file)
--- a/
lib/pleroma/object.ex
+++ b/
lib/pleroma/object.ex
@@
-181,7
+181,7
@@
defmodule Pleroma.Object do
data:
fragment(
"""
data:
fragment(
"""
- jsonb_set(?, '{repliesCount}',
+
safe_
jsonb_set(?, '{repliesCount}',
(coalesce((?->>'repliesCount')::int, 0) + 1)::varchar::jsonb, true)
""",
o.data,
(coalesce((?->>'repliesCount')::int, 0) + 1)::varchar::jsonb, true)
""",
o.data,
@@
-204,7
+204,7
@@
defmodule Pleroma.Object do
data:
fragment(
"""
data:
fragment(
"""
- jsonb_set(?, '{repliesCount}',
+
safe_
jsonb_set(?, '{repliesCount}',
(greatest(0, (?->>'repliesCount')::int - 1))::varchar::jsonb, true)
""",
o.data,
(greatest(0, (?->>'repliesCount')::int - 1))::varchar::jsonb, true)
""",
o.data,