Skip to content

Conversation

@marcin-bazyl
Copy link
Collaborator

COMPLETES #SPARK-697765

This pull request addresses

Code is not always going through the same functions when handling Locus API responses

by making the following changes

This is part of the webinar 5k work. It is a bit of refactoring that's needed for the rest of the webinar 5k work.

Changes done:

  • MeetingUtil.remoteUpdateAudioVideo() used to return just the locus from the response and MuteState class was calling LocusInfo.handleLocusDelta() with that Locus, now instead MeetingUtil.remoteUpdateAudioVideo() returns the full response and the whole response is passed to MeetingUtil.updateLocusFromApiResponse() which calls LocusInfo.handleLocusAPIResponse() which calls LocusInfo.handleLocusDelta() - so the end result is the same but the code goes through MeetingUtil.updateLocusFromApiResponse(), which is the one function that all API responses (apart from Join which is special) should go through
  • in MeetingUtil renamed updateLocusWithDelta() to updateLocusFromApiResponse() - to make it clear that this it the function that should always be used for handling any Locus API response

This refactor is needed for webinar 5k work, because when we use Locus hash trees, the API responses contain a body that doesn't have the locus field but instead contains datasets and a set of hash tree objects, so it's important that all code handling any API responses from Locus goes always through the same util functions and that the whole response (not just the locus part) reaches LocusInfo class.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios where tested

unit tests, end-2-end manual testing as part of webinar 5k work with all the other changes in draft PR#4427

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

I certified that

  • I have read and followed contributing guidelines

  • I discussed changes with code owners prior to submitting this pull request

  • I have not skipped any automated checks

  • All existing and new tests passed

  • I have updated the documentation accordingly


Make sure to have followed the contributing guidelines before submitting.

@marcin-bazyl marcin-bazyl force-pushed the spark-697765_response_api_refactor branch from 9f799dd to 7a55757 Compare September 29, 2025 20:22
@marcin-bazyl marcin-bazyl changed the title fix: small refactor of code handling Locus API responses fix(plugin-meetings): small refactor of code handling Locus API responses Sep 29, 2025
@marcin-bazyl marcin-bazyl added the validated If the pull request is validated for automation. label Sep 29, 2025
@marcin-bazyl marcin-bazyl marked this pull request as ready for review September 29, 2025 20:45
@marcin-bazyl marcin-bazyl requested review from a team as code owners September 29, 2025 20:45
@marcin-bazyl marcin-bazyl enabled auto-merge (squash) October 2, 2025 12:34
@marcin-bazyl marcin-bazyl merged commit 9fee94a into webex:next Oct 2, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants