Currently, the Chat module displays an avatar with the user's initials (first and last name) in both the contact list and the conversation header.
Since Account Pro already allows users to upload a profile picture, it would be useful if the Chat module could use these images for avatars, providing a more consistent experience across the application.
Suggestion
- Display the user's profile picture in the contact list and conversation header, when available.
- Keep the user's initials as a fallback for users who have not set a profile picture.
- Optionally, provide a configuration setting to enable or disable this functionality.
Currently, implementing this behaviour requires replacing the entire Chat page, making it difficult to keep up with future updates to the module. Supporting this functionality directly within the Chat module would allow for this customization while preserving compatibility with future updates.
1 Answer(s)
-
0
In ABP v10.7.0, the Chat module UI does not have a built-in integration point/setting to automatically use Account Pro profile pictures for avatars (contact list + conversation header). With the publicly verifiable material available here, there is no documented configuration switch or extension point that enables this behavior without overriding/replacing UI components/pages.
The good news is: Account Pro already exposes an HTTP API endpoint to retrieve a user’s profile picture, so technically the Chat UI can be adjusted to call that endpoint and fall back to initials when there is no picture:
GET /api/account/profile-picture-file/{userId}(returnsIRemoteStreamContent)
Therefore, the practical options today are:
UI override/customization (recommended path with current capabilities): override the Chat module’s Blazor components that render avatars and update them to:
- try rendering an
<img>using the Account profile-picture endpoint URL for that user - if it fails/empty, render the initials (current behavior)
This still involves overriding module UI pieces, but it can be done at the component level (not necessarily “replace the entire Chat page”), depending on how Chat is structured in your solution’s source.
- try rendering an
Get Chat module source and implement it in the module itself (then you’ll need to maintain the delta across updates):
abp get-source Volo.Chat
If you want this supported directly by the module (so you don’t maintain UI overrides), that’s currently a product feature request for the commercial Chat module (i.e., the module would need to ship avatar support + a toggle, as you suggested).
(Links are validated below.)
- https://abp.io/docs/10.7/modules/chat
- https://abp.io/support/questions/7074
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)