If a webhook specifies a custom override_icon_url, but the image fails to load, we end up with an ugly visual experience:

Instead of failing to load the image, the client should fallback to the default image:

Note that overriding icons requires setting ServiceSettings.EnablePostIconOverride to be true.
Fixing this issue will requires changes in both the mobile and webapp.
--
If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide.
I'll work on this.
Thanks @bdsweet. Let me know, if you have questions.
@hanzei - the image load issue happens both for a successful post and for an ephemeral post in the case the webhook fails and sends a "system_ephemeral" broadcast.
For the ephemeral post, the web client attempts to use the override_icon_url in the ephemeral_message, but on the android mobile client it uses the system icon instead. What's the desired behaviour for the failure case?
but on the android mobile client it uses the system icon instead. What's the desired behaviour for the failure case?
The expected behaviour is the usage of `override_icon_url'. Could you please double check that the mobile client us behaving different and provide steps to reproduce? This seams like a bug.
Yeah, it's easy to reproduce. Just set up a slash-command like a GET to "example.com" which will return HTML that's not in the expected format. Then run the slash-command from the mobile app. It will show the system icon instead of the override icon since in notification.js it checks the system flag first, whereas on the web in post_profile_picture.jsx it only uses the system icon if the message has the system flag but is not a webhook.
I'll just fix that logic along with this issue.
Sorry for the delay - back on this now. Just need to get the end-to-end tests to run correctly and I'll submit a pull request
Thanks for the heads up. Looking forward to your PR @bdsweet :+1:
@bdsweet Need any help?
Making this one available for the public again due to inactivity.
Most helpful comment
I'll work on this.