diff --git a/.changeset/gorgeous-pugs-reply.md b/.changeset/gorgeous-pugs-reply.md new file mode 100644 index 0000000..b8b8199 --- /dev/null +++ b/.changeset/gorgeous-pugs-reply.md @@ -0,0 +1,8 @@ +--- +"@xmtp/content-type-remote-attachment": minor +"@xmtp/content-type-read-receipt": minor +"@xmtp/content-type-reaction": minor +"@xmtp/content-type-reply": minor +--- + +Add dummy fallback field to all content types diff --git a/packages/content-type-reaction/src/Reaction.ts b/packages/content-type-reaction/src/Reaction.ts index 27abe92..0a3294f 100644 --- a/packages/content-type-reaction/src/Reaction.ts +++ b/packages/content-type-reaction/src/Reaction.ts @@ -64,4 +64,8 @@ export class ReactionCodec implements ContentCodec { content: new TextDecoder().decode(content.content), }; } + + fallback(): string | undefined { + return "Error: Sorry, this app cannot display reactions"; + } } diff --git a/packages/content-type-read-receipt/src/ReadReceipt.ts b/packages/content-type-read-receipt/src/ReadReceipt.ts index 6051dd0..13c9f67 100644 --- a/packages/content-type-read-receipt/src/ReadReceipt.ts +++ b/packages/content-type-read-receipt/src/ReadReceipt.ts @@ -39,4 +39,8 @@ export class ReadReceiptCodec implements ContentCodec { timestamp, }; } + + fallback(): string | undefined { + return undefined; + } } diff --git a/packages/content-type-remote-attachment/src/Attachment.ts b/packages/content-type-remote-attachment/src/Attachment.ts index f85c017..65080dc 100644 --- a/packages/content-type-remote-attachment/src/Attachment.ts +++ b/packages/content-type-remote-attachment/src/Attachment.ts @@ -37,4 +37,8 @@ export class AttachmentCodec implements ContentCodec { data: content.content, }; } + + fallback(): string | undefined { + return "Error: Sorry, this app cannot display attachments"; + } } diff --git a/packages/content-type-remote-attachment/src/RemoteAttachment.ts b/packages/content-type-remote-attachment/src/RemoteAttachment.ts index 41611c4..c1cd0d1 100644 --- a/packages/content-type-remote-attachment/src/RemoteAttachment.ts +++ b/packages/content-type-remote-attachment/src/RemoteAttachment.ts @@ -161,4 +161,8 @@ export class RemoteAttachmentCodec implements ContentCodec { filename: content.parameters.filename, }; } + + fallback(): string | undefined { + return "Error: Sorry, this app cannot display attachments"; + } } diff --git a/packages/content-type-reply/src/Reply.ts b/packages/content-type-reply/src/Reply.ts index b9ea875..4d82c66 100644 --- a/packages/content-type-reply/src/Reply.ts +++ b/packages/content-type-reply/src/Reply.ts @@ -84,4 +84,8 @@ export class ReplyCodec implements ContentCodec { content: codec.decode(decodedContent as EncodedContent, codecs), }; } + + fallback(): string | undefined { + return "Error: Sorry, this app cannot display quote replies"; + } }