Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fifty-ducks-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Adds deprecation warning on `saveCannedResponse`
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Match, check } from 'meteor/check';
import { Meteor } from 'meteor/meteor';

import { hasPermissionAsync } from '../../../../../app/authorization/server/functions/hasPermission';
import { methodDeprecationLogger } from '../../../../../app/lib/server/lib/deprecationWarningLogger';
import notifications from '../../../../../app/notifications/server/lib/Notifications';

type ResponseData = {
Expand Down Expand Up @@ -122,6 +123,7 @@ export const saveCannedResponse = async (

Meteor.methods<ServerMethods>({
async saveCannedResponse(_id, responseData) {
methodDeprecationLogger.method('saveCannedResponse', '8.0.0', 'POST /v1/canned-responses');
const userId = Meteor.userId();
if (!userId) {
throw new Meteor.Error('error-not-allowed', 'Not allowed', { method: 'saveCannedResponse' });
Expand Down
Loading