From 1db83a805e72994cd27b6f83060778fcb11b18aa Mon Sep 17 00:00:00 2001
From: ValueOn AG
Date: Sun, 15 Feb 2026 12:20:57 +0100
Subject: [PATCH] fix: strip anon=true from embedded redirect URL for
authenticated joins, increase bot timeout to 60s
Co-authored-by: Cursor
---
src/bot/meetingUrlParser.ts | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/bot/meetingUrlParser.ts b/src/bot/meetingUrlParser.ts
index cd8e571..5d48313 100644
--- a/src/bot/meetingUrlParser.ts
+++ b/src/bot/meetingUrlParser.ts
@@ -72,7 +72,18 @@ export async function resolveLaunchUrl(meetingUrl: string, isAuthenticated: bool
try {
const response = await fetch(trimmed, { redirect: 'follow' });
- const resolvedUrl = new URL(response.url);
+ let resolvedUrlStr = response.url;
+
+ // For authenticated joins: strip anon=true from everywhere in the URL
+ // Teams redirects embed anon=true in the inner url= parameter (URL-encoded)
+ if (isAuthenticated) {
+ resolvedUrlStr = resolvedUrlStr
+ .replace(/[&?]anon=true/gi, '')
+ .replace(/%26anon%3Dtrue/gi, '')
+ .replace(/%26anon%3Dfalse/gi, '');
+ }
+
+ const resolvedUrl = new URL(resolvedUrlStr);
// Add params to suppress the native app launcher dialog
resolvedUrl.searchParams.set('msLaunch', 'false');
@@ -84,6 +95,9 @@ export async function resolveLaunchUrl(meetingUrl: string, isAuthenticated: bool
// Only add anon=true for anonymous joins
if (!isAuthenticated) {
resolvedUrl.searchParams.set('anon', 'true');
+ } else {
+ // Ensure anon is removed from outer params too
+ resolvedUrl.searchParams.delete('anon');
}
return resolvedUrl.toString();