Skip to content

Commit

Permalink
Merge pull request #146 from xmtp/st/group-preference-actions
Browse files Browse the repository at this point in the history
feat: Adds AllowGroup and DenyGroup messages
  • Loading branch information
tuddman committed Feb 15, 2024
2 parents 59ab892 + e3fba9c commit 5fb756a
Show file tree
Hide file tree
Showing 20 changed files with 98 additions and 80 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is the authoritative source of information about the XTMP protocol itself. It contains
This is the authoritative source of information about the XMTP protocol itself. It contains

* an overview of the protocol [PROTOCOL.md](https://github.com/xmtp/proto/blob/main/PROTOCOL.md)
* the protobuf definitions of all the elements of the protocol [/proto](https://github.com/xmtp/proto/blob/main/proto)
Expand Down
2 changes: 1 addition & 1 deletion go/keystore_api/v1/keystore.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/message_api/v1/authn.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/message_api/v1/message_api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/message_api/v1/message_api_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/message_contents/ciphertext.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/message_contents/composite.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/message_contents/contact.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/message_contents/content.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/message_contents/conversation_reference.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/message_contents/invitation.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

98 changes: 51 additions & 47 deletions go/message_contents/message.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/message_contents/private_key.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/message_contents/public_key.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/message_contents/signature.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/mls/api/v1/mls.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/mls/api/v1/mls_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/mls_validation/v1/service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/mls_validation/v1/service_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 29 additions & 15 deletions proto/message_contents/private_preferences.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Private Key Storage
//
// Following definitions are not used in the protocol, instead
// they provide a way for encoding private keys for storage.
// Following definitions are not used in the protocol, instead they provide a
// way for encoding private keys for storage.
syntax = "proto3";

package xmtp.message_contents;
Expand All @@ -11,28 +11,42 @@ import "message_contents/ciphertext.proto";
option go_package = "github.com/xmtp/proto/v3/go/message_contents";
option java_package = "org.xmtp.proto.message.contents";

// PrivatePreferencesAction is a message used to update the client's
// preference store. The only current actions are allow and block.
// Other actions may be added later
// PrivatePreferencesAction is a message used to update the client's preference
// store.
message PrivatePreferencesAction {
// Add the given wallet addresses to the allow list
message Allow {
// Allow 1:1 direct message (DM) access
message AllowDM {
// Add the given wallet addresses to the allow list
repeated string wallet_addresses = 1;
}
// Add the given wallet addresses to the block list
message Block {

// Deny (block) 1:1 direct message (DM) access
message DenyDM {
// Add the given wallet addresses to the deny list
repeated string wallet_addresses = 1;
}

// Allow Group access
message AllowGroup {
// Add the given group_ids to the allow list
repeated bytes group_ids = 1;
}

// Deny (deny) Group access
message DenyGroup {
// Add the given group_ids to the deny list
repeated bytes group_ids = 1;
}

oneof message_type {
Allow allow = 1;
Block block = 2;
AllowDM allow_dm = 1;
DenyDM deny_dm = 2;
AllowGroup allow_group = 3;
DenyGroup deny_group = 4;
}
}

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

0 comments on commit 5fb756a

Please sign in to comment.