-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reply_broadcast
does not send as user even if as_user
is enabled
#1845
Comments
Hi @asportnoy thanks for writing in 💯 Have you tried setting as_user=True for the It should be something like this await slack.chat.update({
channel,
ts: threadMsg.ts!,
as_user: true,
reply_broadcast: true,
}); |
Thanks for the suggestion @WilliamBergamin, unfortunately no dice there. Still turns into the app user when updating. |
I suspect this is a bug in the slack API as it happens with the GO SDK as well. |
Yes from my testing this appear to be a bug with the slack API The following also leads to this strange behavior const message = await client.chat.postMessage({ channel: "C123", as_user: true, text: "testing" })
const threadMsg = await client.chat.postMessage({
channel: "C123",
thread_ts: message.ts,
as_user: true,
text: 'testing',
reply_broadcast: true
}); I'll raise this internally but anyone encountering this issue can report it through |
If I were to guess it's probably the API code that takes the message and clone/updates it to post in two places with those nice links. Probably not passing the as_user to the update API call. This is suggested to me as my BOT is showing messasge_update events being sent out |
👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized. |
unstale please |
(I do understand this could be confusing but) the as_user parameter is a legacy parameter, which works only for classic Slack apps.
The classic apps are no longer available for newly created apps for a while. Thus, you cannot use this parameter anymore. This document page https://api.slack.com/methods/chat.postMessage#arg_as_user should emphasize this much more, so I will ask the document team to update it. If you want to customize the icon and user name, you can use chat:write.customize scope. With this permission, your chat.postMessage API call can include icon_url etc. With that being said, when you post a message using chat:write.customize, the message is still by your app's bot user, not a human. Please refer to slackapi/bolt-python#611 (comment) too. I hear this could be inconvenient and confusing, but my answer here clarifies things for you all. |
(Filling out the following with as much detail as you can provide will help us solve your issue sooner.)
Packages:
Select all that apply:
@slack/web-api
@slack/rtm-api
@slack/webhooks
@slack/oauth
@slack/socket-mode
@slack/types
Reproducible in:
The Slack SDK version
v7.3.1
Node.js runtime version
v20.12.2
OS info
Steps to reproduce:
Expected result:
All 3 messages should send using my profile since
as_user
is enabledActual result:
The first two messages sent as my profile, but the one with
reply_broadcast
enabled sent as the app and not my profile.I also tried to send a message and then update it as a workaround, but it turned into the application as soon as I tried to update it.
PS: TypeScript considers that last one to be an invalid type even though it doesn't seem to be invalid. Might want to fix that.
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.
The text was updated successfully, but these errors were encountered: