The icon_url option on chat.postMessage does not seem to affect the preview avatar image shown in the thread reply summary
jgkingston opened this issue ยท comments
Following the documentation for the chat.postMessage
method I am able to customize the 48px avatar icon next to a message using the icon_url
property. However, when I post a message to a thread, the thread preview in the main channel that lists the replying users and the number of replies does not use the custom avatar. Is there another property or setting that can be passed to customize the 24px version as well?
Packages:
Select all that apply:
-
@slack/web-api
-
@slack/rtm-api
-
@slack/webhooks
-
@slack/oauth
-
@slack/socket-mode
-
@slack/types
- I don't know
Reproducible in:
The Slack SDK version
^3.12.2
Node.js runtime version
v18.11.0
OS info
ProductName: macOS
ProductVersion: 12.5
BuildVersion: 21G72
Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:22 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T6000
Steps to reproduce:
- Create a slack client using the sdk
- Call the
chat.postMessage
method, passing achannel
andthread_ts
to post a reply - Provide a valid image url using the
icon_url
property - View the message in Slack
- See that the 48px message avatar displays the custom image
- Go back the main channel and see the default avatar as the 24px preview
Expected result:
The 24px preview avatar should match the 48px message avatar image
Actual result:
The 24px preview uses the default image
The doggo is missing from the reply preview
Requirements
For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. ๐
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
Hey @jgkingston ๐ I agree that this is confusing behavior but it's what's currently expected in the Slack UI and is why the doggo is missing from the preview ๐ข - this comment has a bit more detail: slackapi/bolt-js#1337 (comment).
I don't believe there are plans to change this soon but I'll share the feedback since the mismatched icons is a common snag. For now I'll close this issue since there isn't a workaround, though I hope to eventually revisit this with better news.
Feedback like this is also super helpful for us when suggesting certain changes, so thank you for writing in! ๐
Thank you so much for the reply and the helpful link. At least it's reassuring to know I hadn't misread the documentation.
How to resolve this issue? i am facing the same problem