1
0
Fork 0
mirror of https://github.com/paricafe/misskey.git synced 2025-04-03 21:49:30 -05:00

fix(backend): 既存のルームメンバーを改めて招待できないように

This commit is contained in:
syuilo 2025-03-25 08:05:59 +09:00
parent 5513337198
commit 8da1368a0b

View file

@ -518,6 +518,10 @@ export class ChatService {
const room = await this.chatRoomsRepository.findOneByOrFail({ id: roomId, ownerId: inviterId });
if (await this.isRoomMember(room, inviteeId)) {
throw new Error('already member');
}
const existingInvitation = await this.chatRoomInvitationsRepository.findOneBy({ roomId, userId: inviteeId });
if (existingInvitation) {
throw new Error('already invited');