From 709a7253d6d93a8b0e82dc0884f1c7b8fb68dc4b Mon Sep 17 00:00:00 2001 From: cameronvoell Date: Tue, 10 Dec 2024 17:11:54 -0800 Subject: [PATCH] feat: reaction content type --- .../content_types/reaction.proto | 40 --------------- .../content_types/reaction.proto | 51 +++++++++++++++++++ 2 files changed, 51 insertions(+), 40 deletions(-) delete mode 100644 proto/message_contents/content_types/reaction.proto create mode 100644 proto/mls/message_contents/content_types/reaction.proto diff --git a/proto/message_contents/content_types/reaction.proto b/proto/message_contents/content_types/reaction.proto deleted file mode 100644 index db93c1d..0000000 --- a/proto/message_contents/content_types/reaction.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -package xmtp.reactions; - -option go_package = "github.com/xmtp/proto/v3/go/reactions"; -option java_package = "org.xmtp.proto.reactions"; - -// Action enum to represent reaction states -enum ReactionAction { - ACTION_UNSPECIFIED = 0; - ACTION_ADDED = 1; - ACTION_REMOVED = 2; -} - -// Schema enum to represent reaction content types -enum ReactionSchema { - SCHEMA_UNSPECIFIED = 0; - SCHEMA_UNICODE = 1; - SCHEMA_SHORTCODE = 2; - SCHEMA_CUSTOM = 3; -} - -// Reaction message type -message Reaction { - // The message ID being reacted to - string reference = 1; - - // The inbox ID of the user who sent the message being reacted to - // Optional for group messages - string reference_inbox_id = 2; - - // The action of the reaction (added or removed) - ReactionAction action = 3; - - // The content of the reaction - string content = 4; - - // The schema of the reaction content - ReactionSchema schema = 5; -} diff --git a/proto/mls/message_contents/content_types/reaction.proto b/proto/mls/message_contents/content_types/reaction.proto new file mode 100644 index 0000000..fc39714 --- /dev/null +++ b/proto/mls/message_contents/content_types/reaction.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; + +package xmtp.mls.message_contents.content_types; + +option go_package = "github.com/xmtp/proto/v3/go/mls/message_contents/content_types"; +option java_package = "org.xmtp.proto.mls.message_contents.content_types"; + +// reaction.proto +// This file defines the ReactionV2 message type and is associated with the following ContentTypeId: +// +// ContentTypeId { +// authority_id: "xmtp.org", +// type_id: "reaction", +// version_major: 2, +// version_minor: 0, +// } +// + +// Action enum to represent reaction states +enum ReactionAction { + REACTION_ACTION_UNSPECIFIED = 0; + REACTION_ACTION_ADDED = 1; + REACTION_ACTION_REMOVED = 2; +} + +// Schema enum to represent reaction content types +enum ReactionSchema { + REACTION_SCHEMA_UNSPECIFIED = 0; + REACTION_SCHEMA_UNICODE = 1; + REACTION_SCHEMA_SHORTCODE = 2; + REACTION_SCHEMA_CUSTOM = 3; +} + +// Reaction message type +message ReactionV2 { + // The message ID being reacted to + string reference = 1; + + // The inbox ID of the user who sent the message being reacted to + // Optional for group messages + string reference_inbox_id = 2; + + // The action of the reaction (added or removed) + ReactionAction action = 3; + + // The content of the reaction + string content = 4; + + // The schema of the reaction content + ReactionSchema schema = 5; +}