Skip to content

Commit

Permalink
feat: make reaction action and schema into enums
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronvoell committed Nov 25, 2024
1 parent 1bc6c0d commit 149ee31
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions proto/message_contents/content_types/reaction.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ 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
Expand All @@ -14,12 +29,12 @@ message Reaction {
// Optional for group messages
string reference_inbox_id = 2;

// The action of the reaction (e.g., "added" or "removed")
string action = 3;
// 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 (e.g., "unicode", "shortcode", "custom")
string schema = 5;
// The schema of the reaction content
ReactionSchema schema = 5;
}

0 comments on commit 149ee31

Please sign in to comment.