We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c3c0a4 commit 6287c76Copy full SHA for 6287c76
services/web/server/src/simcore_service_webserver/conversations/_conversation_message_service.py
@@ -32,18 +32,13 @@
32
33
34
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
+ groups = await list_project_groups(app, project_id=project_id)
+ return {
+ user
+ for group in groups
+ if group.read
+ for user in await get_users_in_group(app, gid=group.gid)
+ }
47
48
49
async def create_message(
0 commit comments