Skip to content

Commit

Permalink
Always display deprecation message
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusbsilva137 authored Jul 16, 2024
1 parent 28ff4d9 commit c405e02
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions apps/meteor/ee/server/api/engagementDashboard/channels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,14 @@ API.v1.addRoute(
const { start, end, hideRoomsWithNoActivity } = this.queryParams;
const { offset, count } = await getPaginationItems(this.queryParams);

if (hideRoomsWithNoActivity) {
apiDeprecationLogger.deprecatedParameterUsage(
this.request.route,
'hideRoomsWithNoActivity',
'7.0.0',
this.response,
({ parameter, endpoint, version }) =>
`Returning rooms that had no activity in ${endpoint} is deprecated and will be removed on version ${version} along with the \`${parameter}\` param. Set \`${parameter}\` as \`true\` to check how the endpoint will behave starting on ${version}`,
);
}
apiDeprecationLogger.deprecatedParameterUsage(
this.request.route,
'hideRoomsWithNoActivity',
'7.0.0',
this.response,
({ parameter, endpoint, version }) =>
`Returning rooms that had no activity in ${endpoint} is deprecated and will be removed on version ${version} along with the \`${parameter}\` param. Set \`${parameter}\` as \`true\` to check how the endpoint will behave starting on ${version}`,
);

const { channels, total } = await findChannelsWithNumberOfMessages({
start: mapDateForAPI(start),
Expand Down

0 comments on commit c405e02

Please sign in to comment.