Skip to content

Commit

Permalink
Fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
albuquerquefabio committed Aug 31, 2022
1 parent 939bb95 commit 442eb3d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
20 changes: 9 additions & 11 deletions apps/meteor/app/api/server/v1/groups.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import _ from 'underscore';
import { Meteor } from 'meteor/meteor';
import { Match, check } from 'meteor/check';
import { Match } from 'meteor/check';
import { Integrations, Messages as MessagesRaw, Uploads, Rooms as RoomsRaw, Subscriptions as SubscriptionsRaw } from '@rocket.chat/models';
import { isGroupsMembersProps, isRoomIdOrRoomNameProps } from '@rocket.chat/rest-typings/dist/v1/groups';

import { mountIntegrationQueryBasedOnPermissions } from '../../../integrations/server/lib/mountQueriesBasedOnPermission';
import { Subscriptions, Rooms, Messages, Users } from '../../../models/server';
Expand All @@ -19,8 +20,6 @@ import { API } from '../api';
import { Team } from '../../../../server/sdk';
import { findUsersOfRoom } from '../../../../server/lib/findUsersOfRoom';
import { addUserToFileObj } from '../helpers/addUserToFileObj';
import { getChannelHistory } from '../../../../app/lib/server/methods/getChannelHistory';
import { isGroupsMembersProps, isRoomIdOrRoomNameProps } from '@rocket.chat/rest-typings/dist/v1/groups';

// Returns the private group subscription IF found otherwise it will return the failure of why it didn't. Check the `statusCode` property
export function findPrivateGroupByIdOrName({ params, userId, checkedArchived = true }) {
Expand Down Expand Up @@ -508,15 +507,14 @@ API.v1.addRoute(
return API.v1.success({
group: this.composeRoomWithLastMessage(room, this.userId),
});
} else {
// remove room object lastMessage
const group = Object.assign({}, room);
delete group.lastMessage;

return API.v1.success({
group,
});
}
// remove room object lastMessage
const group = Object.assign({}, room);
delete group.lastMessage;

return API.v1.success({
group,
});
},
},
);
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/api/server/v1/rooms.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { Rooms as RoomsRaw } from '@rocket.chat/models';
import { isRoomsInfoProps } from '@rocket.chat/rest-typings/dist/v1/rooms';

import { FileUpload } from '../../../file-upload';
import { Rooms, Messages } from '../../../models/server';
Expand All @@ -17,7 +18,6 @@ import { canAccessRoom, canAccessRoomId, hasPermission } from '../../../authoriz
import { Media } from '../../../../server/sdk';
import { settings } from '../../../settings/server/index';
import { getUploadFormData } from '../lib/getUploadFormData';
import { isRoomsInfoProps } from '@rocket.chat/rest-typings/dist/v1/rooms';

function findRoomByIdOrName({ params, checkedArchived = true }) {
const { roomId, roomName } = params;
Expand Down

0 comments on commit 442eb3d

Please sign in to comment.