feat: notes to self via self-DM

Backend:
- Removed self-DM restriction in conversation Create
- Added duplicate check for self-DMs (returns existing one)

Frontend:
- ConversationList: [📝] button creates/opens notes to self
- Self-DMs show as 'Notes' with 📝 icon in sidebar
- DMChat header shows 'Notes' for self-DMs
This commit is contained in:
2026-07-02 08:33:57 -04:00
parent 17c09edc4f
commit a5c3b25cc0
3 changed files with 67 additions and 22 deletions
+10 -7
View File
@@ -75,13 +75,16 @@ export function DMChat() {
}
};
const title = conversation
? conversation.type === "group_dm"
? conversation.name || conversation.members.map((m) => m.username).join(", ")
: conversation.members.find((m) => m.id !== currentUser?.id)?.username || "DM"
: id
? "[LOADING...]"
: "[NO CONVERSATION]";
const selfDM = conversation && conversation.members.length === 1 && conversation.members[0].id === currentUser?.id;
const title = selfDM
? "Notes"
: conversation
? conversation.type === "group_dm"
? conversation.name || conversation.members.map((m) => m.username).join(", ")
: conversation.members.find((m) => m.id !== currentUser?.id)?.username || "DM"
: id
? "[LOADING...]"
: "[NO CONVERSATION]";
return (
<div className="flex flex-col h-full bg-gb-bg">