userData
The parameter userData is used at launch to connect to directline as an already known user. If the user is recognized, the messages received can be customized. For example, the welcom message Hello ! can be transformed in Hello <user_firstname> !
| Name | Required | Type | Default value | Description |
|---|---|---|---|---|
id | Yes | string | User id, used for user recognition | |
name | Yes | string | User's family name (not used) | |
username | Yes | string | User's first name (not used) | |
nom | Yes | string | User's family name | |
prenom | Yes | string | User's first name | |
email | Yes | string | ? | |
token | Yes | string | ? | |
referrer | Yes | string | ? | |
ipaddress | Yes | string | ? |
Here is an example of a default user, with an identifier being modified on each connexion :
const userData = {
name: '',
id: Math.random().toString(36).substring(2, 9),
username: '',
nom: '',
prenom: '',
email: '',
token: '',
referrer: '',
ipaddress: ''
}