Skip to content

Commit 74eb925

Browse files
ggazzoclaude
andcommitted
fix(core-typings): make author_link optional in MessageQuoteAttachment and prevent null md
createQuoteAttachment was propagating null/undefined md from messages. Now only spreads md when truthy. Also author_link was never set in createQuoteAttachment so it must be optional in the type. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8cf1d86 commit 74eb925

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/meteor/lib/createQuoteAttachment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function createQuoteAttachment(
99
) {
1010
return {
1111
text: message.msg,
12-
md: message.md,
12+
...(message.md && { md: message.md }),
1313
...(isTranslatedMessage(message) && { translations: message?.translations }),
1414
message_link: messageLink,
1515
author_name: message.alias || getUserDisplayName(message.u.name, message.u.username, useRealName),

packages/core-typings/src/IMessage/MessageAttachment/MessageQuoteAttachment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { MessageAttachmentBase } from './MessageAttachmentBase';
55

66
export type MessageQuoteAttachment = {
77
author_name: string;
8-
author_link: string;
8+
author_link?: string;
99
author_icon: string;
1010
message_link?: string;
1111
text: string;

0 commit comments

Comments
 (0)