Skip to content

Commit

Permalink
use oneof for add/remove members
Browse files Browse the repository at this point in the history
  • Loading branch information
insipx committed Dec 7, 2023
1 parent 3f372cf commit 1893c3f
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions proto/mls/database/intents.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// V3 invite message structure

syntax = "proto3";

package xmtp.mls.database;
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 1893c3f

Please sign in to comment.