diff --git a/app/components/Chat/Header.vue b/app/components/Chat/Header.vue index b8958e9..6c9c922 100644 --- a/app/components/Chat/Header.vue +++ b/app/components/Chat/Header.vue @@ -10,6 +10,7 @@ // only when the open conversation is a DM. import { badgeText } from '../../lib/chatUnread' import { shortName } from '../../lib/chatFormat' +import { dmActionsTarget } from '../../lib/slots' const props = withDefaults(defineProps<{ back?: boolean; pinsOpen?: boolean }>(), { back: true, pinsOpen: false }) const emit = defineEmits<{ back: []; pins: [] }>() @@ -18,8 +19,8 @@ const chat = useChat() const channel = computed(() => chat.activeChannel) const dm = computed(() => chat.activeDm) -/** The open conversation's kind and row, for the DM-only slot. */ -const conversation = computed(() => dm.value ?? null) +/** The open DM's row, for the DM-only slot (null in a channel). */ +const conversation = computed(() => dmActionsTarget(dm.value)) const dmName = computed(() => (dm.value ? shortName(chat.members.get(dm.value.other_user_id), '', t('chat.someone')) : '')) const title = computed(() => (channel.value ? `# ${channel.value.name}` : dmName.value)) const eyebrow = computed(() => (channel.value ? t('chat.header.channel') : t('chat.header.dm'))) @@ -90,7 +91,7 @@ async function leave() {