mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-13 13:17:45 +02:00
Employee email channel (#2711)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -856,6 +856,19 @@ async function synchronizeUsers (
|
||||
employee: employeeId,
|
||||
role: AccountRole.User
|
||||
})
|
||||
if (u.EMAIL !== undefined && u.EMAIL !== null) {
|
||||
await ops.client.addCollection(
|
||||
contact.class.Channel,
|
||||
contact.space.Contacts,
|
||||
employeeId,
|
||||
contact.class.Employee,
|
||||
'channels',
|
||||
{
|
||||
provider: contact.channelProvider.Email,
|
||||
value: u.EMAIL.trim()
|
||||
}
|
||||
)
|
||||
}
|
||||
await ops.client.createMixin<Doc, BitrixSyncDoc>(
|
||||
employeeId,
|
||||
contact.class.Employee,
|
||||
|
||||
Reference in New Issue
Block a user