feat(voice): add opt-in peer-to-peer calls and country rollouts (#3367)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-10 15:45:17 +02:00
1 parent e5a568acca
commit bef5e33eec
215 files changed
+15840 -2693

No files matched your search

+96
View File
@@ -11268,6 +11268,7 @@
"gateway_rollout": {"$ref": "#/components/schemas/GatewayRolloutConfigResponse"},
"push_relay": {"$ref": "#/components/schemas/PushRelayConfigResponse"},
"domain_migration": {"$ref": "#/components/schemas/DomainMigrationConfigResponse"},
"voice_p2p": {"$ref": "#/components/schemas/VoiceP2pConfigResponse"},
"captcha": {"$ref": "#/components/schemas/CaptchaConfigResponse"},
"experiment_delivery": {"$ref": "#/components/schemas/ExperimentDeliveryConfigResponse"},
"registration": {
@@ -11682,6 +11683,7 @@
"gateway_rollout",
"push_relay",
"domain_migration",
"voice_p2p",
"captcha",
"experiment_delivery",
"registration",
@@ -11820,6 +11822,7 @@
"nullable": true,
"allOf": [{"$ref": "#/components/schemas/DomainMigrationConfigUpdateRequest"}]
},
"voice_p2p": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/VoiceP2pConfigUpdateRequest"}]},
"captcha": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/CaptchaConfigUpdateRequest"}]},
"experiment_delivery": {
"nullable": true,
@@ -14679,6 +14682,10 @@
"nullable": true,
"type": "string"
},
"rtc_p2p": {
"description": "Whether calls in the voice channel connect participants directly instead of through a voice server",
"type": "boolean"
},
"last_message_id": {
"description": "The ID of the last message sent in this channel",
"nullable": true,
@@ -16314,11 +16321,38 @@
"max_counter": {"type": "integer", "minimum": 100, "maximum": 20000}
}
},
"VoiceP2pConfigUpdateRequest": {
"type": "object",
"properties": {
"enabled": {"type": "boolean"},
"rollout_basis_points": {"type": "integer", "minimum": 0, "maximum": 10000},
"rollout_country_codes": {"allOf": [{"$ref": "#/components/schemas/ExperimentRolloutCountryCodesSchema"}]},
"rollout_salt": {"type": "string", "minLength": 1, "maxLength": 64, "pattern": "^[\\x20-\\x7e]+$"},
"included_user_ids": {
"maxItems": 1000,
"type": "array",
"items": {"type": "string", "pattern": "^\\d{1,20}$"}
},
"included_guild_ids": {
"maxItems": 1000,
"type": "array",
"items": {"type": "string", "pattern": "^\\d{1,20}$"}
},
"include_premium_users": {"type": "boolean"},
"excluded_user_ids": {
"maxItems": 1000,
"type": "array",
"items": {"type": "string", "pattern": "^\\d{1,20}$"}
},
"max_participants": {"type": "integer", "minimum": 2, "maximum": 4}
}
},
"DomainMigrationConfigUpdateRequest": {
"type": "object",
"properties": {
"enabled": {"type": "boolean"},
"rollout_basis_points": {"type": "integer", "minimum": 0, "maximum": 10000},
"rollout_country_codes": {"allOf": [{"$ref": "#/components/schemas/ExperimentRolloutCountryCodesSchema"}]},
"rollout_salt": {"type": "string", "minLength": 1, "maxLength": 64, "pattern": "^[\\x20-\\x7e]+$"},
"included_user_ids": {
"maxItems": 1000,
@@ -16355,6 +16389,11 @@
"voice_e2ee_scope": {"type": "string", "enum": ["guild_feature_only", "platform_wide"]}
}
},
"ExperimentRolloutCountryCodesSchema": {
"maxItems": 250,
"type": "array",
"items": {"type": "string", "pattern": "^[A-Z]{2}$"}
},
"BillingLegacyPricesSchema": {
"type": "object",
"additionalProperties": {
@@ -16470,12 +16509,68 @@
"required": ["enabled", "cost", "max_counter"],
"additionalProperties": false
},
"VoiceP2pConfigResponse": {
"type": "object",
"properties": {
"enabled": {"default": false, "type": "boolean"},
"config_version": {"default": 0, "type": "integer", "minimum": 0, "maximum": 9007199254740991},
"rollout_basis_points": {"default": 0, "type": "integer", "minimum": 0, "maximum": 10000},
"rollout_country_codes": {
"default": [],
"allOf": [{"$ref": "#/components/schemas/ExperimentRolloutCountryCodesSchema"}]
},
"rollout_salt": {
"default": "voice-p2p-v1",
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[\\x20-\\x7e]+$"
},
"included_user_ids": {
"default": [],
"maxItems": 1000,
"type": "array",
"items": {"type": "string", "pattern": "^\\d{1,20}$"}
},
"included_guild_ids": {
"default": [],
"maxItems": 1000,
"type": "array",
"items": {"type": "string", "pattern": "^\\d{1,20}$"}
},
"include_premium_users": {"default": false, "type": "boolean"},
"excluded_user_ids": {
"default": [],
"maxItems": 1000,
"type": "array",
"items": {"type": "string", "pattern": "^\\d{1,20}$"}
},
"max_participants": {"default": 2, "type": "integer", "minimum": 2, "maximum": 4}
},
"required": [
"enabled",
"config_version",
"rollout_basis_points",
"rollout_country_codes",
"rollout_salt",
"included_user_ids",
"included_guild_ids",
"include_premium_users",
"excluded_user_ids",
"max_participants"
],
"additionalProperties": false
},
"DomainMigrationConfigResponse": {
"type": "object",
"properties": {
"enabled": {"default": false, "type": "boolean"},
"config_version": {"default": 0, "type": "integer", "minimum": 0, "maximum": 9007199254740991},
"rollout_basis_points": {"default": 0, "type": "integer", "minimum": 0, "maximum": 10000},
"rollout_country_codes": {
"default": [],
"allOf": [{"$ref": "#/components/schemas/ExperimentRolloutCountryCodesSchema"}]
},
"rollout_salt": {
"default": "domain-migration-v1",
"type": "string",
@@ -16509,6 +16604,7 @@
"enabled",
"config_version",
"rollout_basis_points",
"rollout_country_codes",
"rollout_salt",
"included_user_ids",
"included_guild_ids",