/v1/user/:userId endpoint for querying other users
Allow querying of other users at /v1/user/:userId
. As discussed here. Currently it only works for your own id or me
.
The hubot-gitter2 adapter for hubot currently doesn't recognize new users' messages as it attempts to load the new user from /v1/user/:userId
before processing the message but fails.
[hubot-gitter2.debug][object GitterClient<8ed302e03ff9a7a446665e122b7a2b003b10b5ba>] creating promise `users.find:id:56475f7716b6c7089cbab509`
[hubot-gitter2.debug][object GitterClient<8ed302e03ff9a7a446665e122b7a2b003b10b5ba>] {client#get} [/user/56475f7716b6c7089cbab509]
[hubot-gitter2.debug][object GitterClient<8ed302e03ff9a7a446665e122b7a2b003b10b5ba>] {client#request} [GET, /user/56475f7716b6c7089cbab509, ]
node-gitter GET /v1/user/56475f7716b6c7089cbab509?limit=1 +4s
[hubot-gitter2.error][object GitterClient<8ed302e03ff9a7a446665e122b7a2b003b10b5ba>] unable to find user with id `56475f7716b6c7089cbab509`: Error: 403 {"error":"Forbidden"}
[Sat Feb 13 2016 20:23:33 GMT+0200 (EET)] ERROR [hubot-gitter2.error] error loading a user: Error: 403 {"error":"Forbidden"}
[hubot-gitter2.debug][object GitterClient<8ed302e03ff9a7a446665e122b7a2b003b10b5ba>] destroying promise `users.find:id:56475f7716b6c7089cbab509`
So adding this endpoint would fix at least https://github.com/huafu/hubot-gitter2/issues/5.
Edited by 🤖 GitLab Bot 🤖