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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user