Skip to content

Commit d899963

Browse files
committed
refactor: Add TODO comments for direct room restrictions and error handling in user invitation
1 parent 866abd4 commit d899963

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

apps/meteor/app/lib/server/methods/addUsersToRoom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const addUsersToRoomMethod = async (userId: string, data: { rid: string;
5252
});
5353
const userInRoom = subscription != null;
5454

55-
// Can't add to direct room ever
55+
// TODO: Can't add to direct room ever, unless it's a federated room
5656
if (room.t === 'd') {
5757
throw new Meteor.Error('error-cant-invite-for-direct-room', "Can't invite user to direct rooms", {
5858
method: 'addUsersToRoom',

apps/meteor/app/slashcommands-invite/server/server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ slashCommands.add({
9696
await Promise.all(
9797
usersFiltered.map(async (user) => {
9898
try {
99+
// TODO: Refactor this to return an error if some user fails to be added
99100
return await addUsersToRoomMethod(
100101
userId,
101102
{

0 commit comments

Comments
 (0)