From 77f7f4588c8c45bbcb01d1d742fe7b805c965645 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Mon, 6 May 2024 13:36:21 -0700 Subject: [PATCH 1/5] feat: inbox_id transcript messages --- proto/mls/message_contents/transcript_messages.proto | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/proto/mls/message_contents/transcript_messages.proto b/proto/mls/message_contents/transcript_messages.proto index 9a62e9ea..fdde3622 100644 --- a/proto/mls/message_contents/transcript_messages.proto +++ b/proto/mls/message_contents/transcript_messages.proto @@ -8,9 +8,8 @@ option java_package = "org.xmtp.proto.mls.message.contents"; // A group member and affected installation IDs message MembershipChange { - repeated bytes installation_ids = 1; - string account_address = 2; - string initiated_by_account_address = 3; + string inbox_id = 1; + string initiated_by_inbox_id = 2; } // The group membership change proto @@ -21,10 +20,5 @@ message GroupMembershipChanges { repeated MembershipChange members_added = 1; // Members that have been removed in the commit repeated MembershipChange members_removed = 2; - // Installations that have been added in the commit, grouped by member - repeated MembershipChange installations_added = 3; - // Installations removed in the commit, grouped by member - repeated MembershipChange installations_removed = 4; - // protolint:enable REPEATED_FIELD_NAMES_PLURALIZED -} \ No newline at end of file +} From 956c5215e5deac267497b7c1e21b6d59461fa6dd Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Mon, 6 May 2024 19:04:08 -0700 Subject: [PATCH 2/5] chore: move initiated_by_inbox_id to top level --- proto/mls/message_contents/transcript_messages.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/mls/message_contents/transcript_messages.proto b/proto/mls/message_contents/transcript_messages.proto index fdde3622..d85a8b38 100644 --- a/proto/mls/message_contents/transcript_messages.proto +++ b/proto/mls/message_contents/transcript_messages.proto @@ -9,7 +9,6 @@ option java_package = "org.xmtp.proto.mls.message.contents"; // A group member and affected installation IDs message MembershipChange { string inbox_id = 1; - string initiated_by_inbox_id = 2; } // The group membership change proto @@ -21,4 +20,5 @@ message GroupMembershipChanges { // Members that have been removed in the commit repeated MembershipChange members_removed = 2; // protolint:enable REPEATED_FIELD_NAMES_PLURALIZED + string initiated_by_inbox_id = 3; } From e9e7490af977e7fc4e83efa82b9775edfbabca23 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Mon, 6 May 2024 21:35:31 -0700 Subject: [PATCH 3/5] chore: add as new message type --- .../transcript_messages.proto | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/proto/mls/message_contents/transcript_messages.proto b/proto/mls/message_contents/transcript_messages.proto index d85a8b38..10ece521 100644 --- a/proto/mls/message_contents/transcript_messages.proto +++ b/proto/mls/message_contents/transcript_messages.proto @@ -8,7 +8,9 @@ option java_package = "org.xmtp.proto.mls.message.contents"; // A group member and affected installation IDs message MembershipChange { - string inbox_id = 1; + repeated bytes installation_ids = 1; + string account_address = 2; + string initiated_by_account_address = 3; } // The group membership change proto @@ -19,6 +21,37 @@ message GroupMembershipChanges { repeated MembershipChange members_added = 1; // Members that have been removed in the commit repeated MembershipChange members_removed = 2; + // Installations that have been added in the commit, grouped by member + repeated MembershipChange installations_added = 3; + // Installations removed in the commit, grouped by member + repeated MembershipChange installations_removed = 4; + // protolint:enable REPEATED_FIELD_NAMES_PLURALIZED - string initiated_by_inbox_id = 3; +} + +// A summary of the changes in a commit. +// Includes added/removed inboxes and changes to metadata +message GroupUpdated { + // An inbox that was added or removed in this commit + message Inbox { + string inbox_id = 1; + } + + // A summary of a change to the mutable metadata + message MetadataChange { + // The field that was changed + string key = 1; + // The previous value + string old_value = 2; + // The updated value + string new_value = 3; + } + + string initiated_by_inbox_id = 1; + // The inboxes added in the commit + repeated Inbox added_inboxes = 2; + // The inboxes removed in the commit + repeated Inbox removed_inboxes = 3; + // The metadata changes in the commit + repeated MetadataChange metadata_changes = 4; } From 3c6b340b82114d460c45ac8c0fcf712e01cd195d Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Mon, 6 May 2024 22:12:07 -0700 Subject: [PATCH 4/5] chore: rename to field_name --- proto/mls/message_contents/transcript_messages.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/mls/message_contents/transcript_messages.proto b/proto/mls/message_contents/transcript_messages.proto index 10ece521..2825ea9d 100644 --- a/proto/mls/message_contents/transcript_messages.proto +++ b/proto/mls/message_contents/transcript_messages.proto @@ -40,7 +40,7 @@ message GroupUpdated { // A summary of a change to the mutable metadata message MetadataChange { // The field that was changed - string key = 1; + string field_name = 1; // The previous value string old_value = 2; // The updated value From 0fd391b3bdfbb683331763f1977afdb1cb335c95 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Sun, 19 May 2024 11:18:34 -0700 Subject: [PATCH 5/5] feat: update metadata field changes --- proto/mls/message_contents/transcript_messages.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/proto/mls/message_contents/transcript_messages.proto b/proto/mls/message_contents/transcript_messages.proto index 2825ea9d..5b71a5aa 100644 --- a/proto/mls/message_contents/transcript_messages.proto +++ b/proto/mls/message_contents/transcript_messages.proto @@ -38,13 +38,13 @@ message GroupUpdated { } // A summary of a change to the mutable metadata - message MetadataChange { + message MetadataFieldChange { // The field that was changed string field_name = 1; // The previous value - string old_value = 2; + optional string old_value = 2; // The updated value - string new_value = 3; + optional string new_value = 3; } string initiated_by_inbox_id = 1; @@ -53,5 +53,5 @@ message GroupUpdated { // The inboxes removed in the commit repeated Inbox removed_inboxes = 3; // The metadata changes in the commit - repeated MetadataChange metadata_changes = 4; + repeated MetadataFieldChange metadata_field_changes = 4; }