SymphonyPlatformSolutions / symphony-api-client-node

Symphony API Client for NodeJS
MIT License
6 stars 20 forks source link

initBotUser potentially returns inactive and external users #24

Closed miguel-symphony closed 5 years ago

miguel-symphony commented 5 years ago

In SymBotAuth, the initBotUser function uses the v3 user lookup endpoint without local=true :

SymBotAuth/index.js Line 132: 'path': '/pod/v3/users?email=' + symConfig.botEmailAddress,

Result may include active, inactive and external users. This presents a problem if there is a inactive or external user with same email address as bot. Easy enough to workaround by changing the email addresses, but did create some confusion for a bit since SymBotAuth.botUser.id ended up being set to an inactive user id and the bot started responding to itself =)