Currently, Web Chat is responsible for handling the User Agent string in the createDirectLine function and does not allow developers to append to or replace it with their own user agent. We should change this behavior to allow developers to modify Web Chat's user agent string.
In pull request #2101, @compulim listed three approaches to letting developers modify the user agent string.
Devs can somehow get/construct Web Chat default user agent string, and they should append it when they set botAgent
Devs can set appName and appVersion and we help append to the bot agent
Devs set bot agent, but internally in Web Chat, we append to it
Not how other systems handle user agent
Of the three, I believe the first option is the best approach since it's more in line with how other platforms handle user agent - Facebook, Instagram, and Twitter - and gives the developer more freedom; however, this option does imply that the developer is responsible for appending Web Chat's user agent - "(webchat/x.y.z (Full)." This behavior should probably be mirrored in the DirectLineJs package as well.
Description
Currently, Web Chat is responsible for handling the User Agent string in the createDirectLine function and does not allow developers to append to or replace it with their own user agent. We should change this behavior to allow developers to modify Web Chat's user agent string.
In pull request #2101, @compulim listed three approaches to letting developers modify the user agent string.
Of the three, I believe the first option is the best approach since it's more in line with how other platforms handle user agent - Facebook, Instagram, and Twitter - and gives the developer more freedom; however, this option does imply that the developer is responsible for appending Web Chat's user agent - "(webchat/x.y.z (Full)." This behavior should probably be mirrored in the DirectLineJs package as well.
Additional Context Related to #1985
[Enhancement]