-
Notifications
You must be signed in to change notification settings - Fork 20
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
base: release-3.2.0
Are you sure you want to change the base?
Conversation
src/helpers/communications.js
Outdated
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) |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
src/services/connections.js
Outdated
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
No description provided.