From 5cc9d76394823ce7698f2cf5e5885a71c251f7fa Mon Sep 17 00:00:00 2001 From: hobokenchicken Date: Thu, 2 Jul 2026 08:45:52 -0400 Subject: [PATCH] fix: remove user_ids validation that blocked notes-to-self MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'at least one user_id is required' check ran before the creator was added to memberSet, so {user_ids: []} always 400'd. Now empty user_ids is allowed — the creator is always in memberSet. --- internal/dm/handlers.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/dm/handlers.go b/internal/dm/handlers.go index 6bbea73..e55eed5 100644 --- a/internal/dm/handlers.go +++ b/internal/dm/handlers.go @@ -70,10 +70,7 @@ func (h *Handler) Create(w http.ResponseWriter, r *http.Request) { http.Error(w, `{"error":"invalid request"}`, http.StatusBadRequest) return } - if len(req.UserIDs) == 0 { - http.Error(w, `{"error":"at least one user_id is required"}`, http.StatusBadRequest) - return - } + // ponytail: user_ids can be empty for self-DM (notes to self) // Build unique member set including creator. memberSet := map[string]struct{}{userID: {}}