fix: retain voice codec settings now

ref:
This commit is contained in:
Janez T
2026-03-01 11:00:30 +01:00
parent daeb8aeb9c
commit 474fd02635
34 changed files with 3796 additions and 639 deletions

View File

@@ -19,6 +19,8 @@ extension MessageVoiceExtension on Message {
/// Returns null for non-voice messages.
VoicePacketMode? get voicePacketMode {
if (!isVoice || text.isEmpty) return null;
final envelope = VoiceEnvelope.tryParseText(text);
if (envelope != null) return envelope.mode;
final pkt = VoicePacket.tryParseText(text);
return pkt?.mode;
}