Skip to content
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

added: image and user profile update integration with communication service #1035

Open
wants to merge 7 commits into
base: release-3.2.0
Choose a base branch
from

Conversation

nevil-mathew
Copy link
Collaborator

No description provided.

await this.create(user.user_id, user.name, user.email, 'https://picsum.photos/200/200')
let userImage
if (user?.image) {
userImage = await utils.getDownloadableUrl(user.image)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nevil-mathew image should download from user service right ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have added images to the user extension table right, so we will use that image path to get a downloadable URL, which will be used in communication service to download the image and add it to rocket chat.

connectionsWithDetails.forEach((detail) => {
detail.user_details.image = 'https://picsum.photos/200'
connectionsWithDetails.forEach(async (detail) => {
detail.user_details.image = await utils.getDownloadableUrl(detail.user_details.image)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nevil-mathew download the image from user service

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're using the newly added image in user extension to get the image URL.

* @param {Boolean} isAMentor - Indicates whether the user is a mentor.
* @returns {Promise<Object>} - The mentor's profile details.
*/
async details(req) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nevil-mathew why this API needed ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, we only have API to get mentor details, this API allows getting any user details. Will update the JS Doc to mention that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants