If the user has changed their mention name to something other than the concatenation of their first and last name, then hippybot direct messaging won't work as intended.
Via the HipChat API, it looks like you can pull the user's mention_name:
If the user has an API token configured, you could pull their mention_name via the HipChat API and then leverage it. Cache it, too, for bonus points!
it looks like you can pull all users at once via the HipChat API, so another way to solve would be to pull the list on bot startup and cache it. It misses some edge cases (new users or users that change their mention_name since the bot started up), but the list could be re-pulled on bot reload.
GET /v1/users/list?format=json&auth_token=token HTTP/1.1
Host: api.hipchat.com
Unfortunately, it looks like the HipChat API token has to be an admin token in order to pull the user list.
A user can change their HipChat mention name by going into their web settings.
However, the current method of getting the name to send a direct message to is by manipulating the from field in the message:
In https://github.com/1stvamp/hippybot/blob/master/hippybot/decorators.py:
If the user has changed their mention name to something other than the concatenation of their first and last name, then hippybot direct messaging won't work as intended.
Via the HipChat API, it looks like you can pull the user's mention_name:
https://www.hipchat.com/docs/api/method/users/show
If the user has an API token configured, you could pull their mention_name via the HipChat API and then leverage it. Cache it, too, for bonus points!
it looks like you can pull all users at once via the HipChat API, so another way to solve would be to pull the list on bot startup and cache it. It misses some edge cases (new users or users that change their mention_name since the bot started up), but the list could be re-pulled on bot reload.
Unfortunately, it looks like the HipChat API token has to be an admin token in order to pull the user list.