Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adds AllowGroup and DenyGroup messages #146

Merged
merged 7 commits into from
Feb 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions proto/message_contents/private_preferences.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,19 @@ option java_package = "org.xmtp.proto.message.contents";
// preference store. The only current actions are allow and block.
// Other actions may be added later
message PrivatePreferencesAction {
// Add the given wallet addresses to the allow list
// Grant access
message Allow {
// Add the given wallet addresses to the allow list
repeated string wallet_addresses = 1;
// Add the given group_ids to the allow list
repeated string group_ids = 2;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

group_ids should repeated bytes

}
// Add the given wallet addresses to the block list
// Deny access
message Block {
// Add the given wallet addresses to the block list
repeated string wallet_addresses = 1;
// Add the given group_ids to the block list
repeated string group_ids = 2;
Copy link
Collaborator

@neekolas neekolas Feb 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are going to want a separate action for these, rather than a second field in the existing action. Otherwise you could specify both in the same action, which is confusing.

We can safely rename the existing type names to something like AllowDM for clarity (although all our SDKs will have to update their import statements)

Copy link
Contributor Author

@tuddman tuddman Feb 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I updated to pull out AllowGroup and BlockGroup DenyGroup into their own message types.
and renamed Allow to AllowDM and Block to BlockDM DenyDM. I'll update the SDK side next.

}

oneof message_type {
Expand All @@ -32,7 +38,5 @@ message PrivatePreferencesAction {

// The payload that goes over the wire
message PrivatePreferencesPayload {
oneof version {
Ciphertext v1 = 1;
}
}
oneof version { Ciphertext v1 = 1; }
}
Loading