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: add UnknownStrategy enum for future-proofing #89

Merged
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
10 changes: 10 additions & 0 deletions proto/messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,17 @@ message GenericMessage {
ButtonActionConfirmation buttonActionConfirmation = 22;
DataTransfer dataTransfer = 23; // client-side synchronization across devices of the same user
InCallEmoji inCallEmoji = 24;
// UnknownStrategy unknownStrategy = 25; -- Defined outside the oneof
// Next field should be 26 ↓
}
optional UnknownStrategy unknownStrategy = 25 [default = IGNORE];
}

// See internal RFC: "2024-07-18 RFC Improve future-proofing for new OTR message types"
enum UnknownStrategy {
IGNORE = 0; // Ignore the message completely. Trash. Bye
DISCARD_AND_WARN = 1; // Warn the user, but discard the message, as it won't be helpful in the future.
WARN_USER_ALLOW_RETRY = 2; // Warn the user. Client has freedom to store it and retry in the future.
}

message QualifiedUserId {
Expand Down
Loading