Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Corrects the generation of the hash variable name #355

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

AlanMartines
Copy link
Contributor

Corrects the generation of the hash variable name, error when generating with white spaces and special characters.

Error:

{
  "status": 500,
  "error": "Internal Server Error",
  "response": {
    "message": "Command failed: /root/evolution-api/node_modules/@ffmpeg-installer/linux-x64/ffmpeg -i /root/evolution-api/store/temp/temp-+55 (99) 9 9999-9999-1704891424843.mp3 -vn -ab 128k -ar 44100 -f ipod /root/evolution-api/store/temp/+55 (99) 9 9999-9999-1704891424843.mp4 -y\n/bin/sh: 1: Syntax error: \"(\" unexpected\n"
  }
}

Fix:
Added the parameter number = number.replace(/\D/g, ""); before the line const hash = ${number}-${new Date().getTime()}; to remove any non-numeric characters in the processAudio function.

…nerating with white spaces and special characters.
@DavidsonGomes DavidsonGomes changed the base branch from main to develop January 11, 2024 15:57
@DavidsonGomes DavidsonGomes merged commit ba9f97b into EvolutionAPI:develop Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants