Skip to content

chore: remove deprecated methods for livechat in 8.0 #7058

Merged
diegolmello merged 17 commits intodevelopfrom
deprecated-method-remove
Mar 24, 2026
Merged

chore: remove deprecated methods for livechat in 8.0 #7058
diegolmello merged 17 commits intodevelopfrom
deprecated-method-remove

Conversation

@Rohit3523
Copy link
Copy Markdown
Contributor

@Rohit3523 Rohit3523 commented Mar 18, 2026

Proposed changes

Remove deprecated methods based on https://docs.rocket.chat/docs/deprecated-and-phasing-out-features.

New endpoints

  • livechat/agent.status
  • livechat/room.resumeOnHold
  • users.sendConfirmationEmail
  • livechat/room.closeByUser
  • livechat/room.forward
  • livechat/tags

Deprecated methods

  • livechat:changeLivechatStatus
  • livechat:resumeOnHold
  • sendConfirmationEmail
  • livechat:closeRoom
  • livechat:transfer
  • livechat:getTagsList

Issue(s)

https://rocketchat.atlassian.net/browse/SUP-1008

How to test or reproduce

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Summary by CodeRabbit

  • New Features

    • Added omnichannel actions for agent status, closing, forwarding, resuming on-hold conversations, and retrieving livechat tags.
    • Added user email confirmation endpoint.
  • Changes

    • Inquiry take now accepts an optional assignee and returns a success status.
    • Returning an inquiry now returns both result and success flags instead of a bare boolean.
    • Various livechat API calls now return consistent success indicators.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 18, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1c98faef-3126-4bd4-beec-5503397b441a

📥 Commits

Reviewing files that changed from the base of the PR and between 65e1252 and f765b05.

📒 Files selected for processing (4)
  • app/definitions/rest/v1/omnichannel.ts
  • app/definitions/rest/v1/users.ts
  • app/ee/omnichannel/lib/index.ts
  • app/lib/services/restApi.ts

Walkthrough

Updates REST endpoint definitions (omnichannel + users) and modifies client-side logic to prefer new REST endpoints for server versions >= 8.0.0 while preserving legacy SDK method-wrapper fallbacks for older servers.

Changes

Cohort / File(s) Summary
Endpoint Definitions
app/definitions/rest/v1/omnichannel.ts, app/definitions/rest/v1/users.ts
Added omnichannel REST endpoints (livechat/agent.status, livechat/room.closeByUser, livechat/room.forward, livechat/tags, livechat/room.resumeOnHold); updated livechat/inquiries.take params/return and livechat/inquiries.returnAsInquiry return; added users.sendConfirmationEmail (POST) signature.
EE Omnichannel Logic
app/ee/omnichannel/lib/index.ts
Introduced server-version branching: changeLivechatStatus now uses sdk.post('livechat/agent.status') for >=8.0.0 else legacy livechat:changeLivechatStatus; takeResume(roomId) posts livechat/room.resumeOnHold for >=8.0.0 else legacy livechat:resumeOnHold.
Client REST services
app/lib/services/restApi.ts
Updated service functions to branch by server version: sendConfirmationEmail now returns { success: boolean } and posts users.sendConfirmationEmail for >=8.0.0; closeLivechat posts livechat/room.closeByUser for >=8.0.0 else calls livechat:closeRoom; forwardLivechat posts livechat/room.forward for >=8.0.0 else calls livechat:transfer; getTagsList is async and uses livechat/tags for >=8.0.0 returning `tags

Sequence Diagram(s)

sequenceDiagram
    participant UI as Client UI
    participant Service as restApi Service
    participant Store as Redux Store
    participant SDK as SDK (methodCallWrapper / REST)
    participant Server as Server API

    UI->>Service: invoke action (change status / resume / close / forward / send confirmation / get tags)
    Service->>Store: read server.version
    alt server.version >= "8.0.0"
        Service->>SDK: POST REST endpoint (e.g., livechat/agent.status, livechat/room.resumeOnHold, users.sendConfirmationEmail, livechat/room.closeByUser, livechat/room.forward, livechat/tags)
        SDK->>Server: HTTP POST/GET to REST API
        Server-->>SDK: REST response ({ success: boolean, ... })
        SDK-->>Service: return response
    else older server
        Service->>SDK: call legacy method wrapper (e.g., livechat:changeLivechatStatus, livechat:resumeOnHold, sendConfirmationEmail, livechat:closeRoom, livechat:transfer, livechat:getTagsList)
        SDK->>Server: DDP method call
        Server-->>SDK: method response
        SDK-->>Service: return response
    end
    Service-->>UI: resolve promise / return result
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

type: chore

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective: removing deprecated livechat methods in preparation for version 8.0 compatibility.
Linked Issues check ✅ Passed The PR addresses SUP-1008 by replacing all deprecated livechat methods with new REST endpoints, restoring omnichannel toggle functionality and ensuring server 8.0+ compatibility.
Out of Scope Changes check ✅ Passed All changes directly support the objective of migrating deprecated livechat methods to REST endpoints; no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@Rohit3523 Rohit3523 had a problem deploying to official_android_build March 18, 2026 16:13 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build March 18, 2026 16:13 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build March 18, 2026 16:13 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build March 18, 2026 16:29 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build March 18, 2026 16:29 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to official_android_build March 18, 2026 16:29 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build March 18, 2026 17:08 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to official_android_build March 18, 2026 17:08 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build March 18, 2026 17:08 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build March 19, 2026 12:03 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to official_android_build March 19, 2026 12:03 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build March 19, 2026 12:03 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to official_android_build March 19, 2026 13:19 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build March 19, 2026 13:19 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build March 19, 2026 13:19 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to official_android_build March 19, 2026 13:47 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build March 19, 2026 13:47 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build March 19, 2026 13:47 — with GitHub Actions Error
Copy link
Copy Markdown
Contributor

@OtavioStasiak OtavioStasiak left a comment

Choose a reason for hiding this comment

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

LGTM

@diegolmello diegolmello force-pushed the deprecated-method-remove branch from 65e1252 to f765b05 Compare March 24, 2026 12:17
@diegolmello diegolmello requested a deployment to approve_e2e_testing March 24, 2026 12:17 — with GitHub Actions Waiting
@diegolmello diegolmello merged commit f9c99a2 into develop Mar 24, 2026
4 of 6 checks passed
@diegolmello diegolmello deleted the deprecated-method-remove branch March 24, 2026 12:17
@diegolmello diegolmello requested a deployment to experimental_ios_build March 24, 2026 12:21 — with GitHub Actions Waiting
@diegolmello diegolmello requested a deployment to experimental_android_build March 24, 2026 12:21 — with GitHub Actions Waiting
@diegolmello diegolmello requested a deployment to official_android_build March 24, 2026 12:21 — with GitHub Actions Waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants