Skip to content

Commit 6287c76

Browse files
compact
1 parent 8c3c0a4 commit 6287c76

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

services/web/server/src/simcore_service_webserver/conversations/_conversation_message_service.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,13 @@
3232

3333

3434
async def _get_recipients(app, project_id) -> set[UserID]:
35-
groups = [
36-
project_to_group.gid
37-
for project_to_group in await list_project_groups(app, project_id=project_id)
38-
if project_to_group.read
39-
]
40-
41-
recipients = set()
42-
for group_id in groups:
43-
group_users = await get_users_in_group(app, gid=group_id)
44-
recipients.update(group_users)
45-
46-
return recipients
35+
groups = await list_project_groups(app, project_id=project_id)
36+
return {
37+
user
38+
for group in groups
39+
if group.read
40+
for user in await get_users_in_group(app, gid=group.gid)
41+
}
4742

4843

4944
async def create_message(

0 commit comments

Comments
 (0)