Commit graph

3 commits

Author SHA1 Message Date
Season
807fd2a69f fix(gateway): preserve legacy /voice off suppression across #12542 migration
Legacy unprefixed voice-mode rows were dropped during the #12542
platform-namespacing migration, causing one unwanted auto-TTS reply on
Telegram chats that had /voice off before the upgrade. Preserve legacy
"off" rows on load and apply them as a cross-platform fallback; explicit
platform-prefixed rows take precedence so a later /voice on/tts cannot
be silently re-suppressed after a restart.

Fixes #14025
2026-04-22 22:56:40 +08:00
Teknium
491cf25eef test(voice): update existing voice_mode tests for platform-prefixed keys
Follow-up to 40164ba1.

- _handle_voice_channel_join/leave now use event.source.platform instead of
  hardcoded Platform.DISCORD (consistent with other voice handlers).
- Update tests/gateway/test_voice_command.py to use 'platform:chat_id' keys
  matching the new _voice_key() format.
- Add platform isolation regression test for the bug in #12542.
- Drop decorative test_legacy_key_collision_bug (the fix makes the
  collision impossible; the test mutated a single key twice, not a
  real scenario).
- Adapter mocks in _sync_voice_mode_state_to_adapter tests now set
  adapter.platform = Platform.* (required by new isinstance check).
2026-04-19 22:36:00 -07:00
Tranquil-Flow
52a972e927 fix(gateway): namespace voice mode state by platform to prevent cross-platform collision (#12542) 2026-04-19 22:36:00 -07:00