Fix: getchannelavatarurl function in chatHeader and RoomInformation to Reflect Updated Avatar Changes.#888
Conversation
2ef2985 to
8f3bb40
Compare
| ); | ||
| const workspaceLevelRoles = useUserStore((state) => state.roles); | ||
|
|
||
| const { RCInstance, ECOptions } = useRCContext(); |
There was a problem hiding this comment.
Any specific reason for removing this and using useContext here ?
There was a problem hiding this comment.
Thank you for reviewing the changes. Both implementations were working correctly, and there wasn't a specific reason to prefer one over the other. I chose to switch to useContext because I find that more readable and easier to understand. However, if you have any concerns or suggestions, I’m eager to learn and discuss them.
| <Avatar | ||
| size="36px" | ||
| style={{ marginRight: '6px' }} | ||
| url={getChannelAvatarURL(channelInfo.name)} |
There was a problem hiding this comment.
Thank you for reviewing the changes ! , I decided to use RCInstance.rid instead of channelInfo.name for the avatar URL because it links the avatar directly to the unique room ID. This ensures that the avatar updates correctly with the avatarETag (i.e cache-busting via avatarETag) and helps avoid any issues if channel names change or get duplicated. It should keep the avatar display consistent and up-to-date whenever there are changes in Rocket.Chat.
|
Looks like a great addition, @AyushKumar123456789 |
|
Hi @AyushKumar123456789 |
|
Sir, I think I have replied to the two comments you made 2 weeks ago, pardon me but I am not able to understand which comments there are any more than those two questions you are talking about |
|
Sir, I'm looking forward to hearing back from you. Let me know if there is anything I can do. |




Brief Title
Fix getChannelAvatarURL to Reflect Updated Avatar Changes in rocket.chat.
Acceptance Criteria fulfillment
Fixes #887
Video/Screenshots
Room.Avatar.bug.solved.mp4
PR Test Details
Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-<pr_number> after approval. Contributors are requested to replace
<pr_number>with the actual PR number.