From 1893c3f94b616658553f1ea9f663ab3fac4b6203 Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Thu, 7 Dec 2023 12:07:17 -0500 Subject: [PATCH] use oneof for add/remove members --- proto/mls/database/intents.proto | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/proto/mls/database/intents.proto b/proto/mls/database/intents.proto index 60e479ea..80d88158 100644 --- a/proto/mls/database/intents.proto +++ b/proto/mls/database/intents.proto @@ -1,4 +1,5 @@ // V3 invite message structure + syntax = "proto3"; package xmtp.mls.database; @@ -17,12 +18,24 @@ message SendMessageData { V1 v1 = 1; } } +// Wrapper around a list af EVM Account Addresses +message AccountAddresses { + repeated string account_addresses = 1; +} + +// Wrapper around a list of Installation IDs +message InstallationIds { + repeated bytes installation_ids = 1; +} // The data required to add members to a group message AddMembersData { // V1 of AddMembersPublishData message V1 { - repeated string account_addresses = 1; + oneof address_or_installation_id { + AccountAddresses account_addresses = 1; + InstallationIds installation_ids = 1; + } } oneof version { @@ -34,7 +47,10 @@ message AddMembersData { message RemoveMembersData { // V1 of RemoveMembersPublishData message V1 { - repeated string account_addresses = 1; + oneof address_or_installation_id { + AccountAddresses account_addresses = 1; + InstallationIds installation_ids = 1; + } } oneof version {