Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/Service/Group/ContactsGroupService.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ public function getUsers(string $groupId): array {
}
foreach ($emails as $email) {
$receivers[] = [
'email' => $email
'id' => $r['UID'],
'name' => $r['FN'] ?: $email,
'email' => $email,
];
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/Service/GroupsIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function getMatchingGroups(string $term): array {
'label' => $g['name'] . ' (' . $gs->getNamespace() . ')',
'email' => $gid,
'source' => 'groups',
'contents' => $gs->getUsers($g['id']),
];
}
}
Expand Down
23 changes: 18 additions & 5 deletions src/components/Composer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1523,11 +1523,24 @@ export default {

let changed = false
if (option.id) {
if (!existing.has(option.email.toLowerCase())) {
const recipient = { ...option }
this.newRecipients.push(recipient)
list.push(recipient)
changed = true
let toAdd

if (option.contents) {
toAdd = option.contents.map((content) => ({
email: content.email,
label: content.name,
}))
} else {
toAdd = [option]
}

for (const opt of toAdd) {
if (!existing.has(opt.email.toLowerCase())) {
const recipient = { ...opt }
this.newRecipients.push(recipient)
list.push(recipient)
changed = true
}
}
} else {
const emailList = parseEmailList(option.email)
Expand Down
Loading