VoiceMessages: Read file from dynamic path (fixes mac & linux support)

This commit is contained in:
V 2023-07-27 01:56:45 +02:00
parent d18681c197
commit fe5e041db8
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
3 changed files with 11 additions and 6 deletions

View file

@ -49,7 +49,7 @@ export const VoiceRecorderDesktop: VoiceRecorder = ({ setAudioBlob, onRecordingC
} else {
discordVoice.stopLocalAudioRecording(async (filePath: string) => {
if (filePath) {
const buf = await VencordNative.pluginHelpers.VoiceMessages.readRecording();
const buf = await VencordNative.pluginHelpers.VoiceMessages.readRecording(filePath);
if (buf)
setAudioBlob(new Blob([buf], { type: "audio/ogg; codecs=opus" }));
else