diff --git a/backend/routes/member/get_members.go b/backend/routes/member/get_members.go
index 7883744..34c0b35 100644
--- a/backend/routes/member/get_members.go
+++ b/backend/routes/member/get_members.go
@@ -19,9 +19,10 @@ type memberListResponse struct {
Links []string `json:"links"`
Names []db.FieldEntry `json:"names"`
Pronouns []db.PronounEntry `json:"pronouns"`
+ Unlisted bool `json:"unlisted"`
}
-func membersToMemberList(ms []db.Member) []memberListResponse {
+func membersToMemberList(ms []db.Member, isSelf bool) []memberListResponse {
resps := make([]memberListResponse, len(ms))
for i := range ms {
resps[i] = memberListResponse{
@@ -33,6 +34,10 @@ func membersToMemberList(ms []db.Member) []memberListResponse {
Names: db.NotNull(ms[i].Names),
Pronouns: db.NotNull(ms[i].Pronouns),
}
+
+ if isSelf {
+ resps[i].Unlisted = ms[i].Unlisted
+ }
}
return resps
@@ -66,7 +71,7 @@ func (s *Server) getUserMembers(w http.ResponseWriter, r *http.Request) error {
return err
}
- render.JSON(w, r, membersToMemberList(ms))
+ render.JSON(w, r, membersToMemberList(ms, isSelf))
return nil
}
@@ -79,6 +84,6 @@ func (s *Server) getMeMembers(w http.ResponseWriter, r *http.Request) error {
return err
}
- render.JSON(w, r, membersToMemberList(ms))
+ render.JSON(w, r, membersToMemberList(ms, true))
return nil
}
diff --git a/frontend/src/routes/@[username]/+page.svelte b/frontend/src/routes/@[username]/+page.svelte
index f57cb27..29686c6 100644
--- a/frontend/src/routes/@[username]/+page.svelte
+++ b/frontend/src/routes/@[username]/+page.svelte
@@ -30,7 +30,7 @@
import { apiFetchClient } from "$lib/api/fetch";
import ErrorAlert from "$lib/components/ErrorAlert.svelte";
import { goto } from "$app/navigation";
- import {renderMarkdown} from "$lib/utils"
+ import { renderMarkdown } from "$lib/utils";
import ReportButton from "./ReportButton.svelte";
import ProfileLink from "./ProfileLink.svelte";
import { memberNameRegex } from "$lib/api/regex";
@@ -212,6 +212,9 @@
You don't have any members yet.
Members are sub-profiles that can have their own avatar, names, pronouns, and preferred terms.
+
+ If you were expecting to see members here, check your
+ list of hidden members.
(only you can see this)