fix: sync DrKLO report selection support

This commit is contained in:
iamxvbaba 2026-07-24 11:57:01 +08:00
parent 70e57b4d07
commit 840ef6237c
4 changed files with 93 additions and 0 deletions

View file

@ -0,0 +1,22 @@
package android
const clientType = "android"
// OfferInitialMessageReportOptions preserves DrKLO's official channel-report
// flow. DrKLO starts that flow with an empty message-id vector and only opens
// its message selector after a chosen option receives MESSAGE_ID_REQUIRED.
//
// This exception is deliberately limited to the non-mutating first request:
// a selected option, a comment, or any non-Android caller must still pass the
// normal messages.report message-id validation.
func OfferInitialMessageReportOptions(
client string,
messageIDCount int,
option []byte,
comment string,
) bool {
return client == clientType &&
messageIDCount == 0 &&
len(option) == 0 &&
comment == ""
}