diff --git a/CHANGELOG.md b/CHANGELOG.md index 8671b130..665fcbe1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Builtin Prosody: optional settings to change the url for Prosody's API calls. * Diagnostic tool: testing API communication from Peertube to Prosody. * Diagnostic tool: testing API communication from Prosody to Peertube. +* Diagnostic tool: correctly parse Prosody nightly build versions. ## v3.0.0 diff --git a/server/lib/diagnostic/prosody.ts b/server/lib/diagnostic/prosody.ts index 4fb84785..f069eb54 100644 --- a/server/lib/diagnostic/prosody.ts +++ b/server/lib/diagnostic/prosody.ts @@ -74,7 +74,7 @@ export async function diagProsody (test: string, options: RegisterServerOptions) return result } - const versionMatches = about.match(/^Prosody\s*(\d+)\.(\d+)\.(\d+)\s*$/mi) + const versionMatches = about.match(/^Prosody\s*(\d+)\.(\d+)(?:\.(\d+)| (nightly build \d+.*))\s*$/mi) if (!versionMatches) { result.messages.push({ level: 'error', @@ -84,7 +84,7 @@ export async function diagProsody (test: string, options: RegisterServerOptions) } else { const major = versionMatches[1] const minor = versionMatches[2] - const patch = versionMatches[3] + const patch = versionMatches[3] ?? versionMatches[4] result.messages.push(`Prosody version is ${major}.${minor}.${patch}`) if (major !== '0' && minor !== '11') { result.messages.push({