-
Notifications
You must be signed in to change notification settings - Fork 47
Add ? to the url and value to fetch values from env #236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes update the video call URL in the properties file by appending a question mark and modify the meeting link generation logic in the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant VideoCallServiceImpl
participant PropertiesFile
Client->>VideoCallServiceImpl: Request meeting link
VideoCallServiceImpl->>PropertiesFile: Read video-call-url (now ends with '?')
VideoCallServiceImpl->>VideoCallServiceImpl: Generate 8-char random string
VideoCallServiceImpl->>VideoCallServiceImpl: Concatenate URL + "m=" + random string
VideoCallServiceImpl-->>Client: Return formatted meeting link
Possibly related PRs
Poem
π Recent review detailsConfiguration used: CodeRabbit UI π Files selected for processing (1)
π§ Files skipped from review as they are similar to previous changes (1)
β° Context from checks skipped due to timeout of 90000ms (4)
β¨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
π Files selected for processing (2)
src/main/environment/common_example.properties(1 hunks)src/main/java/com/iemr/common/service/videocall/VideoCallServiceImpl.java(1 hunks)
β° Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Build
- GitHub Check: Package-test
- GitHub Check: Analyze (java)
- GitHub Check: style-check / checkstyle
π Additional comments (1)
src/main/environment/common_example.properties (1)
201-201: LGTM! Proper URL formatting for query parameters.The addition of the question mark correctly prepares the base URL for query parameters that will be appended by the Java code.
| @Override | ||
| public String generateMeetingLink() { | ||
| meetingLink=jitsiLink+RandomStringUtils.randomAlphanumeric(8); | ||
| meetingLink=jitsiLink+"m="+RandomStringUtils.randomAlphanumeric(8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical bug: Using uninitialized variable instead of the populated field.
The code is using the uninitialized jitsiLink variable instead of the meetingLink field that's populated from properties via @Value. Since jitsiLink is null, this will result in "nullm=XXXXXXXX" instead of the intended URL.
Apply this fix to use the correct variable:
-meetingLink=jitsiLink+"m="+RandomStringUtils.randomAlphanumeric(8);
+meetingLink = meetingLink + "m=" + RandomStringUtils.randomAlphanumeric(8);Additional considerations:
- Thread safety: Modifying the field in a service method creates race conditions in multi-threaded environments
- Security: Consider using a longer, cryptographically secure meeting ID
- Design: The field serves dual purposes (input/output) which is confusing
Consider this alternative approach that addresses thread safety:
-meetingLink=jitsiLink+"m="+RandomStringUtils.randomAlphanumeric(8);
-logger.info("Meeting link: " + meetingLink);
-return meetingLink;
+String generatedLink = meetingLink + "m=" + RandomStringUtils.randomAlphanumeric(8);
+logger.info("Meeting link: " + generatedLink);
+return generatedLink;π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| meetingLink=jitsiLink+"m="+RandomStringUtils.randomAlphanumeric(8); | |
| meetingLink = meetingLink + "m=" + RandomStringUtils.randomAlphanumeric(8); |
|




π Description
JIRA ID:
NA
β Type of Change
βΉοΈ Additional Information
Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.
Summary by CodeRabbit