Fix get_channel_status() to decrypt stored keys

The function was trying to format encrypted keys directly,
causing ValueError when reading ENC: prefixed stored keys.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Aaron D. Lee
2026-01-08 00:00:30 -05:00
parent be8744179d
commit 96b49c68ec

View File

@@ -411,11 +411,12 @@ def get_channel_status() -> dict:
for config_path in CONFIG_LOCATIONS: for config_path in CONFIG_LOCATIONS:
if config_path.exists(): if config_path.exists():
try: try:
file_key = config_path.read_text().strip() stored = config_path.read_text().strip()
if file_key and format_channel_key(file_key) == key: file_key = _decrypt_from_storage(stored)
if file_key and validate_channel_key(file_key) and format_channel_key(file_key) == key:
source = str(config_path) source = str(config_path)
break break
except (OSError, PermissionError): except (OSError, PermissionError, ValueError):
continue continue
return { return {