Skip to content

Commit

Permalink
Streaming Consent (#227)
Browse files Browse the repository at this point in the history
* streamed consent message

* nit

* nit

* comments
  • Loading branch information
codabrink authored Nov 18, 2024
1 parent c19032b commit 0b7e2a2
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions proto/mls/message_contents/content.proto
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ message PlaintextEnvelope {
// Expected to be EncodedContent
bytes content = 2;
// Initiator sends a request to receive sync payload
DeviceSyncRequest request = 3;
DeviceSyncRequest device_sync_request = 3;
// Some other authorized installation sends a reply with a link to payload
DeviceSyncReply reply = 4;
DeviceSyncReply device_sync_reply = 4;
// A streamed cosnent update
ConsentUpdate consent_update = 5;
}
}

Expand Down Expand Up @@ -113,3 +115,25 @@ enum DeviceSyncKind {
DEVICE_SYNC_KIND_MESSAGE_HISTORY = 1;
DEVICE_SYNC_KIND_CONSENT = 2;
}

// A streamed consent update
message ConsentUpdate {
ConsentEntityType entity_type = 1;
ConsentState state = 2;
string entity = 3;
}

// The type of entity the user is consenting to
enum ConsentEntityType {
CONSENT_ENTITY_TYPE_UNSPECIFIED = 0;
CONSENT_ENTITY_TYPE_CONVERSATION_ID = 1;
CONSENT_ENTITY_TYPE_INBOX_ID = 2;
CONSENT_ENTITY_TYPE_ADDRESS = 3;
}

// Possible states of consent
enum ConsentState {
CONSENT_STATE_UNSPECIFIED = 0;
CONSENT_STATE_ALLOWED = 1;
CONSENT_STATE_DENIED = 2;
}

0 comments on commit 0b7e2a2

Please sign in to comment.