slackapi / node-slack-sdk

Slack Developer Kit for Node.js

Home Page:https://slack.dev/node-slack-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. Create a slack client using the sdk
  2. Call the chat.postMessage method, passing a channel and thread_ts to post a reply
  3. Provide a valid image url using the icon_url property
  4. View the message in Slack
  5. See that the 48px message avatar displays the custom image
  6. 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

Screen Shot 2024-03-19 at 10 17 56 AM

The doggo is missing from the reply preview

Screen Shot 2024-03-19 at 10 18 08 AM

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