Skip to content

Conversation

@lucas-a-pelegrino
Copy link
Contributor

@lucas-a-pelegrino lucas-a-pelegrino commented Oct 15, 2025

Proposed changes (including videos or screenshots)

This PR adds the deprecation warning to sendFileLivechatMessage.

Issue(s)

CORE-1412

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores

    • Added a deprecation warning for the legacy Livechat file upload method. A warning is logged when the old method is used, encouraging migration to the newer API.
  • Documentation

    • Added a changeset entry noting the deprecation. No breaking changes; patch release planned.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Oct 15, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Oct 15, 2025

🦋 Changeset detected

Latest commit: a5459c3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 42 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/federation-service Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 15, 2025

Walkthrough

Adds a deprecation warning to the Meteor method sendFileLivechatMessage by invoking methodDeprecationLogger with target version 8.0.0 and suggested REST alternative /v1/livechat/upload/:rid. Also introduces a patch changeset entry documenting this deprecation.

Changes

Cohort / File(s) Summary
Deprecation changeset
.changeset/clever-cycles-sing.md
Adds a patch changeset noting deprecation of sendFileLivechatMessage.
Livechat method deprecation logging
apps/meteor/app/livechat/server/methods/sendFileLivechatMessage.ts
Imports methodDeprecationLogger and logs deprecation for sendFileLivechatMessage with version 8.0.0, advising /v1/livechat/upload/:rid before invoking the original method.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Client
  participant M as Meteor Method: sendFileLivechatMessage
  participant D as methodDeprecationLogger
  participant H as Handler: sendFileLivechatMessage

  C->>M: call(rid, file, ...)
  M->>D: method('sendFileLivechatMessage','8.0.0','/v1/livechat/upload/:rid')
  Note right of D: Emit deprecation warning
  D-->>M: ack
  M->>H: execute handler with params
  H-->>M: result
  M-->>C: result
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • KevLehman
  • MartinSchoeler
  • dougfabris

Poem

I thump the logs with gentle cheer,
“Old paths fade; new routes appear!”
A nibble of code, a hop to REST,
/v1 lanes feel swift and best.
With whiskers twitching, I proclaim:
Deprecate today—still ship the same. 🐇✨

Pre-merge checks and finishing touches

✅ 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 succinctly describes the primary change of adding a deprecation warning for the sendFileLivechatMessage method and aligns with the changeset without extraneous information or ambiguity.
Linked Issues Check ✅ Passed The pull request implements the coding objective from CORE-1412 by importing and invoking methodDeprecationLogger for sendFileLivechatMessage and includes a corresponding changeset entry, fully satisfying the linked issue’s requirement.
Out of Scope Changes Check ✅ Passed All code changes directly relate to adding the deprecation warning for sendFileLivechatMessage and its associated changeset entry, with no unrelated modifications present.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/v7/CORE-1412

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 31a135c and 65dd94d.

📒 Files selected for processing (2)
  • .changeset/clever-cycles-sing.md (1 hunks)
  • apps/meteor/app/livechat/server/methods/sendFileLivechatMessage.ts (2 hunks)
🔇 Additional comments (3)
.changeset/clever-cycles-sing.md (1)

1-5: LGTM! Changeset format is correct.

The changeset correctly uses a patch version for the deprecation warning and provides a clear description.

apps/meteor/app/livechat/server/methods/sendFileLivechatMessage.ts (2)

16-16: LGTM! Import statement is correctly placed.

The import of methodDeprecationLogger is appropriately positioned with other relative imports.


116-116: No changes needed: deprecation warning matches actual REST route /v1/livechat/upload/:rid.


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.

@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.56%. Comparing base (9d20655) to head (a5459c3).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37235      +/-   ##
===========================================
- Coverage    67.58%   67.56%   -0.03%     
===========================================
  Files         3295     3295              
  Lines       112648   112648              
  Branches     20450    20448       -2     
===========================================
- Hits         76136    76107      -29     
- Misses       33842    33867      +25     
- Partials      2670     2674       +4     
Flag Coverage Δ
e2e 57.33% <ø> (+0.02%) ⬆️
unit 71.57% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lucas-a-pelegrino lucas-a-pelegrino marked this pull request as ready for review October 15, 2025 18:51
@lucas-a-pelegrino lucas-a-pelegrino requested a review from a team as a code owner October 15, 2025 18:51
@lucas-a-pelegrino lucas-a-pelegrino added this to the 7.11.0 milestone Oct 15, 2025
@lucas-a-pelegrino lucas-a-pelegrino added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider labels Oct 15, 2025
@kodiakhq kodiakhq bot merged commit f8150c1 into develop Oct 15, 2025
49 checks passed
@kodiakhq kodiakhq bot deleted the chore/v7/CORE-1412 branch October 15, 2025 20:44
antm-rp pushed a commit to antm-rp/Rocket.Chat that referenced this pull request Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants