Skip to content

Commit

Permalink
chore: TS
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchoeler committed Dec 31, 2024
1 parent 89ab3a4 commit 3e7527b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
5 changes: 0 additions & 5 deletions apps/meteor/app/api/server/v1/rooms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
isRoomsOpenProps,
isRoomsMembersOrderedByRoleProps,
} from '@rocket.chat/rest-typings';
import { MembershipCache } from 'matrix-appservice-bridge';
import { Meteor } from 'meteor/meteor';

import { isTruthy } from '../../../../lib/isTruthy';
Expand Down Expand Up @@ -909,10 +908,6 @@ API.v1.addRoute(
rolesInOrder: rolesOrder || ['owner', 'moderator'],
});

members.forEach((member) => {
console.log(member.roles);
});

return API.v1.success({
members,
count: members.length,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Default.args = {
username: 'rocket.cat',
status: UserStatus.ONLINE,
name: 'Rocket.Cat',
roles: ['owner'],
},
],
text: 'filter',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import { VirtuosoScrollbars } from '../../../../components/CustomScrollbars';
import InfiniteListAnchor from '../../../../components/InfiniteListAnchor';

type RoomMemberUser = Pick<IUser, 'username' | '_id' | 'name' | 'status' | 'freeSwitchExtension'> & { roles: IRole['_id'] };
type RoomMemberUser = Pick<IUser, 'username' | '_id' | 'name' | 'status' | 'freeSwitchExtension'> & { roles?: IRole['_id'][] };

type RoomMembersProps = {
rid: IRoom['_id'];
Expand Down
2 changes: 1 addition & 1 deletion packages/rest-typings/src/v1/rooms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ export type RoomsEndpoints = {

'/v1/rooms.membersOrderedByRole': {
GET: (params: RoomsMembersOrderedByRoleProps) => PaginatedResult<{
members: IUser & { roles: IRole['_id'] }[];
members: IUser & { roles: IRole['_id'][] };
}>;
};
};

0 comments on commit 3e7527b

Please sign in to comment.