Skip to content

[PB-6002]: fix/provide-userId-when-leaving-as-an-anon-user#199

Merged
jzunigax2 merged 3 commits intomainfrom
fix--provide-userId-when-leaving-as-an-anon-user
Mar 24, 2026
Merged

[PB-6002]: fix/provide-userId-when-leaving-as-an-anon-user#199
jzunigax2 merged 3 commits intomainfrom
fix--provide-userId-when-leaving-as-an-anon-user

Conversation

@jzunigax2
Copy link

Provide userId in leave body call when leaving as an anon user.

@jzunigax2 jzunigax2 added the bug Something isn't working label Mar 19, 2026
@jzunigax2 jzunigax2 self-assigned this Mar 19, 2026
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 19, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
meet-web 013d2f5 Commit Preview URL

Branch Preview URL
Mar 23 2026, 04:35 PM

MeetingService.instance.leaveCall(roomId);

const user = LocalStorageManager.instance.getUser();
const anonymousUserId = user ? undefined : LocalStorageManager.instance.getAnonymousUUID();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it work for the meeting moderator (the user who created the call)?

Copy link
Author

@jzunigax2 jzunigax2 Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes for the moderator or any signed in user it simply the userId is inferred from their jwt. so post request body can be null, if anything is specified it would be ignored

@jzunigax2 jzunigax2 marked this pull request as ready for review March 23, 2026 12:58
Comment on lines +134 to +136
const user = LocalStorageManager.instance.getUser();
const anonymousUserId = user ? undefined : LocalStorageManager.instance.getAnonymousUUID();
await MeetingService.instance.leaveCall(roomId, anonymousUserId ? { userId: anonymousUserId } : undefined);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe could extrat this logic to a helper function in order to not maitain same code in different places , what do you think?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, thanks! addressed

… improved user identification when leaving calls
@sonarqubecloud
Copy link

@github-actions
Copy link

Deploying meet-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 013d2f5
Status:  ✅  Deploy successful!
Preview URL: https://dcb82080.meet-web.pages.dev
Updated (Europe/Madrid): 23/3/2026, 17:34:19

View logs

Copy link

@CandelR CandelR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready for QA :)

@TamaraFinogina
Copy link

@jzunigax2 jzunigax2 merged commit da0473f into main Mar 24, 2026
8 checks passed
@jzunigax2 jzunigax2 deleted the fix--provide-userId-when-leaving-as-an-anon-user branch March 24, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants