From aff4d7fdbeeb747dee05aa774a83c40a464c436e Mon Sep 17 00:00:00 2001 From: cameronvoell Date: Thu, 19 Dec 2024 10:52:37 -0800 Subject: [PATCH] add codec files and type_ids --- xmtp_content_types/src/lib.rs | 5 +++++ xmtp_content_types/src/reaction.rs | 6 ++++++ xmtp_content_types/src/read_receipt.rs | 6 ++++++ xmtp_content_types/src/remote_attachment.rs | 6 ++++++ xmtp_content_types/src/reply.rs | 6 ++++++ xmtp_content_types/src/transaction_reference.rs | 6 ++++++ 6 files changed, 35 insertions(+) create mode 100644 xmtp_content_types/src/reaction.rs create mode 100644 xmtp_content_types/src/read_receipt.rs create mode 100644 xmtp_content_types/src/remote_attachment.rs create mode 100644 xmtp_content_types/src/reply.rs create mode 100644 xmtp_content_types/src/transaction_reference.rs diff --git a/xmtp_content_types/src/lib.rs b/xmtp_content_types/src/lib.rs index 3bafb2a03..c0fe8fb42 100644 --- a/xmtp_content_types/src/lib.rs +++ b/xmtp_content_types/src/lib.rs @@ -1,6 +1,11 @@ pub mod group_updated; pub mod membership_change; +pub mod reaction; +pub mod reply; +pub mod read_receipt; +pub mod remote_attachment; pub mod text; +pub mod transaction_reference; use thiserror::Error; use xmtp_proto::xmtp::mls::message_contents::{ContentTypeId, EncodedContent}; diff --git a/xmtp_content_types/src/reaction.rs b/xmtp_content_types/src/reaction.rs new file mode 100644 index 000000000..50a89ebce --- /dev/null +++ b/xmtp_content_types/src/reaction.rs @@ -0,0 +1,6 @@ +pub struct ReactionCodec {} + +impl ReactionCodec { + const AUTHORITY_ID: &'static str = "xmtp.org"; + pub const TYPE_ID: &'static str = "reaction"; +} diff --git a/xmtp_content_types/src/read_receipt.rs b/xmtp_content_types/src/read_receipt.rs new file mode 100644 index 000000000..a81a2b7ad --- /dev/null +++ b/xmtp_content_types/src/read_receipt.rs @@ -0,0 +1,6 @@ +pub struct ReadReceiptCodec {} + +impl ReadReceiptCodec { + const AUTHORITY_ID: &'static str = "xmtp.org"; + pub const TYPE_ID: &'static str = "read_receipt"; +} diff --git a/xmtp_content_types/src/remote_attachment.rs b/xmtp_content_types/src/remote_attachment.rs new file mode 100644 index 000000000..77680aefe --- /dev/null +++ b/xmtp_content_types/src/remote_attachment.rs @@ -0,0 +1,6 @@ +pub struct RemoteAttachmentCodec {} + +impl RemoteAttachmentCodec { + const AUTHORITY_ID: &'static str = "xmtp.org"; + pub const TYPE_ID: &'static str = "remote_attachment"; +} diff --git a/xmtp_content_types/src/reply.rs b/xmtp_content_types/src/reply.rs new file mode 100644 index 000000000..6f8ba32f3 --- /dev/null +++ b/xmtp_content_types/src/reply.rs @@ -0,0 +1,6 @@ +pub struct ReplyCodec {} + +impl ReplyCodec { + const AUTHORITY_ID: &'static str = "xmtp.org"; + pub const TYPE_ID: &'static str = "reply"; +} diff --git a/xmtp_content_types/src/transaction_reference.rs b/xmtp_content_types/src/transaction_reference.rs new file mode 100644 index 000000000..c7060dc88 --- /dev/null +++ b/xmtp_content_types/src/transaction_reference.rs @@ -0,0 +1,6 @@ +pub struct TransactionReferenceCodec {} + +impl TransactionReferenceCodec { + const AUTHORITY_ID: &'static str = "xmtp.org"; + pub const TYPE_ID: &'static str = "transaction_reference"; +}