You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 16, 2023. It is now read-only.
Hi, first of all thank you for an amazing package!
We have faced the problem, while using your package in development of the chat feature for our application.
The problem is this:
We put a link for avatar image for each participant in chat adapter.
Then we payed attention, that on every Angular change detection, the avatar images are loaded again:
We checked the package code and found that
[src]="sanitizer.bypassSecurityTrustResourceUrl(user.avatar)"
[src]="sanitizer.bypassSecurityTrustResourceUrl(getChatWindowAvatar(window.participant, message))" in the \node_modules\ng-chat\fesm5 line 1525, are the strings, that are causing this problem.
To be more particular, it is sanitizer.bypassSecurityTrustResourceUrl function of the DomSanitizer.
We found out, if we allow Dom sanitation, by removing that function, everything works fine:
[src]="user.avatar"
[src]="getChatWindowAvatar(window.participant, message)"
Could you please deal with this issue, and let us know when it is solved.
Thank you, and best regards, AirsoftLtd development team.
The text was updated successfully, but these errors were encountered:
This was added as a request by another user long time ago. I believe the sanitizer is helpful when the resources are coming from a different domain then the running application itself. I'll make this a configuration and leave it off by default which should fix your issue. I'm planning a patch release with small bug fixes soon so keep an eye on this.
Hi Rafael, thank you for the quick reply.
Making it configuration for users choice is great solution for this.
Thank you and best regards
From: Rafael Carvalho <[email protected]>
Sent: Saturday, August 24, 2019 12:21 AM
To: rpaschoal/ng-chat <[email protected]>
Cc: victorz-airsoft <[email protected]>; Mention <[email protected]>
Subject: Re: [rpaschoal/ng-chat] Avatar images are loading again and again on each Application changeDetection (#134)
Hi @victorz-airsoft <https://github.com/victorz-airsoft> ,
This was added as a request by another user long time ago. I believe the sanitizer is helpful when the resources are coming from a different domain then the running application itself. I'll make this a configuration and leave it off by default which should fix your issue. I'm planning a patch release with small bug fixes soon so keep an eye on this.
Cheers
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#134?email_source=notifications&email_token=AM7J7TA637NG5UJFCL6K5F3QGBIE3A5CNFSM4IO5OK62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5BLQ7I#issuecomment-524466301> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AM7J7THV4PJBXGW3273BKB3QGBIE3ANCNFSM4IO5OK6Q> .
Hi, first of all thank you for an amazing package!
We have faced the problem, while using your package in development of the chat feature for our application.
The problem is this:
We put a link for avatar image for each participant in chat adapter.

Then we payed attention, that on every Angular change detection, the avatar images are loaded again:
We checked the package code and found that
[src]="sanitizer.bypassSecurityTrustResourceUrl(user.avatar)"
[src]="sanitizer.bypassSecurityTrustResourceUrl(getChatWindowAvatar(window.participant, message))" in the \node_modules\ng-chat\fesm5 line 1525, are the strings, that are causing this problem.
To be more particular, it is sanitizer.bypassSecurityTrustResourceUrl function of the DomSanitizer.
We found out, if we allow Dom sanitation, by removing that function, everything works fine:
[src]="user.avatar"
[src]="getChatWindowAvatar(window.participant, message)"
Could you please deal with this issue, and let us know when it is solved.
Thank you, and best regards, AirsoftLtd development team.
The text was updated successfully, but these errors were encountered: