X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fuser.ex;h=f0912fb100bfd7ee24d797deafbb6342842fb75a;hb=33d0250edc3a98c4e491c974553aaa3b9d1b3822;hp=617f160e0e547159237ff64bdb84e59368c64add;hpb=c58da1118279f6c399ea0e32e532d5441b059c56;p=akkoma diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 617f160e0..f0912fb10 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -718,7 +718,7 @@ defmodule Pleroma.User do 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 ) @@ -739,7 +739,7 @@ defmodule Pleroma.User do 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 ) @@ -812,7 +812,7 @@ defmodule Pleroma.User do set: [ info: fragment( - "jsonb_set(?, '{follower_count}', ?::varchar::jsonb, true)", + "safe_jsonb_set(?, '{follower_count}', ?::varchar::jsonb, true)", u.info, s.count )