-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get User Email Address From Script #64
Comments
Hi again @richardwlu, as with my response to your comment on #136. Rocket-chat-bot-helpers is a package you can add manually (its not part of core or published to Meteor yet), that will give you methods to run a user query, which includes returning their email array. There's been discussion of adding these methods to the adapter, but I don't actually think its possible at this point. |
You would just need the appropriate meteor command to live in rocket.chat with the bot having the appropriate permission to view the users details and you would be able to get via: Feel free to take a poke around the methods, and open a pull request on the Rocket.Chat project to add those. Just a forewarning... You'll need to make sure the method checks to see if a user has permission to see the information. |
This can be done in the latest (pre-release) adapter, using the SDK's new API client to get additional data not provided in the message object - depending on the bot user's permissions. e.g...
See API docs for full details: https://rocket.chat/docs/developer-guides/rest-api/users/info/ Please test the pre release, by adding it to your We'll update the version published to NPM as soon as we have more feedback that its stable. |
Please assign this to me. |
1 similar comment
Please assign this to me. |
Are we able to get the
user``email address
while in the script? So far, I can see in themessage
object we have:I can get the
User
name
but now wondering if there is a way to pull the email address either from rocket.chat or the LDAP instance using thename
?The text was updated successfully, but these errors were encountered: