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
9 changes: 8 additions & 1 deletion apps/meteor/server/api/v1/omnichannel/departments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
findArchivedDepartments,
} from './lib/departments';
import { hasPermissionAsync } from '../../../lib/authorization/hasPermission';
import { apiDeprecationLogger } from '../../../lib/deprecationWarningLogger';
import {
saveDepartment,
archiveDepartment,
Expand Down Expand Up @@ -254,10 +255,16 @@ API.v1.addRoute(
return API.v1.failure("The 'selector' param is required");
}

const parsedSelector = JSON.parse(selector);

if (parsedSelector.conditions && Object.keys(parsedSelector.conditions).length > 0) {
apiDeprecationLogger.parameter(this.route, 'conditions', '9.0.0', this.response);
}

return API.v1.success(
await findDepartmentsToAutocomplete({
uid: this.userId,
selector: JSON.parse(selector),
selector: parsedSelector,
onlyMyDepartments: onlyMyDepartments === 'true',
showArchived: showArchived === 'true',
}),
Expand Down
8 changes: 7 additions & 1 deletion apps/meteor/server/api/v1/omnichannel/visitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
findVisitorsByEmailOrPhoneOrNameOrUsernameOrCustomField,
} from './lib/visitors';
import { canAccessRoomAsync } from '../../../lib/authorization';
import { apiDeprecationLogger } from '../../../lib/deprecationWarningLogger';
import { normalizeMessagesForUser } from '../../../lib/utils/lib/normalizeMessagesForUser';
import { getPaginationItems } from '../../lib/getPaginationItems';

Expand Down Expand Up @@ -120,10 +121,15 @@ API.v1.addRoute(
{
async get() {
const { selector } = this.queryParams;
const parsedSelector = JSON.parse(selector);

if (parsedSelector.conditions && Object.keys(parsedSelector.conditions).length > 0) {
apiDeprecationLogger.parameter(this.route, 'conditions', '9.0.0', this.response);
}

return API.v1.success(
await findVisitorsToAutocomplete({
selector: JSON.parse(selector),
selector: parsedSelector,
}),
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { formatIntoFullMatrixUsername, formatUsernameAndDomainIntoMatrixFormat }
import { registerUser } from '../../utils/register-user';
import { test, expect, setupTesting, tearDownTesting } from '../../utils/test';

test.describe.only('Federation - Threads', () => {
test.describe('Federation - Threads', () => {
let poFederationChannelServer1: FederationChannel;
let poFederationChannelServer2: FederationChannel;
let userFromServer2UsernameOnly: string;
Expand Down
Loading