fix: Fix locale problem when having multiple plugins #178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Problem: When multiple plugins were loaded in the same meeting, one
localesBaseUrlcould interfere in the others'. That's mainly because the query we had to search for this particular base URL was not filtering for thepluginName, so basically the locales would work quite well when having only one plugin.Solution: As
localesBaseUrldoes not change during the entire meeting and we have that information the second we build thepluginApifor a particular plugin, instead of getting it via subscription, or even query, the client (bigbluebutton-html5) will send it inside the pluginApi, which besides fixing the issue, will spare another subscription/query from running.More
Closely related to: bigbluebutton/bigbluebutton#23049
See the before and after of the fix (the three red arrows are plugins, so we can see that multiple plugins are running on this meeting - both before and after the fix).
Before:
After: