Skip to content

Conversation

@vanitha1822
Copy link
Member

@vanitha1822 vanitha1822 commented Jun 24, 2025

πŸ“‹ Description

JIRA ID:

NA

βœ… Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)

ℹ️ 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

  • Bug Fixes

    • Improved JSON output for SMS and video call APIs by ensuring special characters (=, <, >, &) are displayed correctly instead of as Unicode escape sequences.
  • Style

    • Updated code formatting and indentation for better readability; no changes to application behavior.
  • Chores

    • Updated configuration for the video call URL.

@vanitha1822 vanitha1822 self-assigned this Jun 24, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 24, 2025

Walkthrough

The changes update the video-call-url property by appending a question mark, adjust how this property is injected and used in VideoCallServiceImpl, and modify meeting link generation to include a "m=" prefix. Additionally, the JSON responses in both SMS and video call controllers are post-processed to unescape certain Unicode characters. Formatting adjustments were made in SMSServiceImpl without altering logic.

Changes

File(s) Change Summary
src/main/environment/common_example.properties Appended a question mark to the video-call-url property value.
src/main/java/com/iemr/common/controller/sms/SMSController.java Modified sendSMS to replace Unicode escape sequences for =, <, >, and & in JSON output before returning.
src/main/java/com/iemr/common/service/sms/SMSServiceImpl.java Formatting and whitespace adjustments only; no logic changes.
src/main/java/com/iemr/common/service/videocall/VideoCallServiceImpl.java Moved @Value to a new jitsiLink field, changed meeting link format, added logging, and post-processed JSON output.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant SMSController
    participant VideoCallServiceImpl
    participant SMSServiceImpl

    Client->>SMSController: POST /sendSMS
    SMSController->>SMSServiceImpl: process SMS request
    SMSServiceImpl-->>SMSController: OutputResponse
    SMSController->>SMSController: Replace Unicode escapes in JSON
    SMSController-->>Client: JSON response (unescaped)

    Client->>VideoCallServiceImpl: Request to generate meeting link
    VideoCallServiceImpl->>VideoCallServiceImpl: Generate random string
    VideoCallServiceImpl->>VideoCallServiceImpl: meetingLink = jitsiLink + "m=" + randomString
    VideoCallServiceImpl->>VideoCallServiceImpl: Log jitsiLink value
    VideoCallServiceImpl-->>Client: JSON response (unescaped)
Loading

Possibly related PRs

  • PSMRI/Common-API#233: Modifies injection and usage of video-call-url in VideoCallServiceImpl, similar to this PR.
  • PSMRI/Common-API#236: Makes identical changes to the video-call-url property and VideoCallServiceImpl, directly related.
  • PSMRI/Common-API#180: Introduces the original video call consultation feature, which this PR modifies and builds upon.

Suggested labels

enhancement

Suggested reviewers

  • palani-ND

Poem

A question mark hops on the URL’s tail,
Meeting links now start with β€œm=”, without fail.
SMS replies, with symbols set free,
No more escapesβ€”just clarity!
With tidy code and logs anew,
The rabbits cheer, β€œThis hop’s for you!”
πŸ‡βœ¨


πŸ“œ Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 139c933 and a04aa38.

πŸ“’ Files selected for processing (4)
  • src/main/environment/common_example.properties (1 hunks)
  • src/main/java/com/iemr/common/controller/sms/SMSController.java (1 hunks)
  • src/main/java/com/iemr/common/service/sms/SMSServiceImpl.java (2 hunks)
  • src/main/java/com/iemr/common/service/videocall/VideoCallServiceImpl.java (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: style-check / checkstyle
  • GitHub Check: Package-test
  • GitHub Check: Build
  • GitHub Check: Analyze (java)
πŸ”‡ Additional comments (6)
src/main/environment/common_example.properties (1)

201-201: LGTM! Proper URL formatting for parameter concatenation.

The addition of ? to the video call URL correctly prepares it for query parameter concatenation, which aligns with the meeting link generation logic in VideoCallServiceImpl.

src/main/java/com/iemr/common/controller/sms/SMSController.java (1)

210-216: ```shell
#!/bin/bash

Locate the sendSMS method declaration and surrounding context in SMSController.java

rg -n -C 5 "sendSMS" src/main/java/com/iemr/common/controller/sms/SMSController.java


</details>
<details>
<summary>src/main/java/com/iemr/common/service/videocall/VideoCallServiceImpl.java (2)</summary>

`40-42`: **Good separation of concerns for URL handling.**

Moving the `@Value` annotation to a dedicated `jitsiLink` field and keeping `meetingLink` as a plain string field improves code clarity and separation of concerns.

---

`51-52`: **Verify compatibility of URL format change.**

The meeting link generation now includes an "m=" parameter prefix, changing the URL structure. Ensure this format change is compatible with:
1. Existing video call clients/integrations
2. The Jitsi Meet platform configuration
3. Any URL parsing logic in other parts of the system



```shell
#!/bin/bash
# Search for existing usage of meeting links to verify compatibility
rg -A 5 -B 5 "meetingLink|jitsiLink|video.*call.*url"
src/main/java/com/iemr/common/service/sms/SMSServiceImpl.java (2)

197-205: Good formatting standardization.

The conversion from tabs to spaces improves code consistency and readability. This aligns with standard Java formatting practices.


351-351: Consistent whitespace formatting improvements.

The whitespace adjustments enhance code readability and maintain formatting consistency throughout the file.

Also applies to: 359-360

✨ Finishing Touches
  • πŸ“ Generate Docstrings

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.

❀️ Share
πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vanitha1822 vanitha1822 requested a review from vishwab1 June 24, 2025 11:38
@sonarqubecloud
Copy link

@vishwab1 vishwab1 merged commit 95399d5 into develop Jun 24, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants