mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Respect description privacy when searching members
This commit is contained in:
parent
56eae82b0a
commit
dd9cc3ef0c
3 changed files with 21 additions and 7 deletions
|
|
@ -46,5 +46,12 @@ select members.*,
|
|||
4,
|
||||
extract(month from members.birthday)::integer,
|
||||
extract(day from members.birthday)::integer
|
||||
) end as birthday_md
|
||||
) end as birthday_md,
|
||||
|
||||
-- Extract member description as seen by "the public"
|
||||
case
|
||||
-- Privacy '1' = public; just return description as normal
|
||||
when members.description_privacy = 1 then members.description
|
||||
-- Any other privacy (rn just '2'), return null description (missing case = null in SQL)
|
||||
end as public_description
|
||||
from members;
|
||||
Loading…
Add table
Add a link
Reference in a new issue