mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-02-25 03:16:37 -05:00
Fix
This commit is contained in:
@@ -30,13 +30,13 @@ export const createPrivateUserMessageChannel: APIHandler<
|
||||
throw new APIError(
|
||||
404,
|
||||
`Private user ${userIds.find(
|
||||
(uid) => !toPrivateUsers.map((p) => p.id).includes(uid),
|
||||
(uid) => !toPrivateUsers.map((p: any) => p.id).includes(uid),
|
||||
)} not found`,
|
||||
)
|
||||
|
||||
if (
|
||||
toPrivateUsers.some((user) =>
|
||||
user.blockedUserIds.some((blockedId) => userIds.includes(blockedId)),
|
||||
toPrivateUsers.some((user: any) =>
|
||||
user.blockedUserIds.some((blockedId: string) => userIds.includes(blockedId)),
|
||||
)
|
||||
) {
|
||||
throw new APIError(403, 'One of the users has blocked another user in the list')
|
||||
|
||||
Reference in New Issue
Block a user