Contact

Обзор

Пользователь или роль, которая может взаимодействовать с приложением Workflow.

  • Начиная с версии: 2020.20

Свойства

Свойства

id

id: string

Уникальный идентификатор контакта.

const currentEntry = workflowApi.currentThread.entries[0];
if(workflowApi.session.currentUser.id === currentEntry.owner.id){
 console.log("You can enable options for owner user only")
}

name

name: string

Имя контакта в удобочитаемом виде.

workflowApi.session.currentUser.name.includes('admin')){
 console.log("Current user name contains 'admin' in his name");
}

type

type: ContactType

Тип контакта. Контакты в потоке или записи могут быть либо пользователем, либо ролью.

if(workflowApi.session.currentUser.type !== workflowApi.enums.ContactType.Role){
 console.log("Current user is not a Role");
}