-
Notifications
You must be signed in to change notification settings - Fork 263
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
Simple say() method call goes to "History" tab in Slack UI instead of "Chat" for Direct messages #1292
Comments
Hey @vinupriyesh 👋 Thanks for sharing this! At the moment I'm finding a response in the Chat tab when using Here's a reference app manifest I was using{
"display_information": {
"name": "example-app-123"
},
"features": {
"app_home": {
"home_tab_enabled": true,
"messages_tab_enabled": true,
"messages_tab_read_only_enabled": false
},
"bot_user": {
"display_name": "example-app-123",
"always_online": false
},
"shortcuts": [
{
"name": "Run sample shortcut",
"type": "global",
"callback_id": "sample_shortcut_id",
"description": "Runs a sample shortcut"
}
],
"slash_commands": [
{
"command": "/sample-command",
"description": "Runs a sample command",
"should_escape": false
}
]
},
"oauth_config": {
"scopes": {
"bot": [
"channels:history",
"chat:write",
"commands",
"im:history",
"assistant:write"
]
}
},
"settings": {
"event_subscriptions": {
"bot_events": [
"app_home_opened",
"message.channels",
"message.im",
"assistant_thread_started",
"assistant_thread_context_changed"
]
},
"interactivity": {
"is_enabled": true
},
"org_deploy_enabled": true,
"socket_mode_enabled": true,
"token_rotation_enabled": false
}
} I'm curious if this is similar to what you're finding? I'm also wanting to confirm that the initial message is sent from the app Chat tab? This seems unexpected to me, but other details or logs or manifests you can share might be helpful! |
thanks @zimeg, In my case, it doesn't even show in "Chat" tab, and ONLY seen in "History" tab. I suspect it is not able to link with the current thread. So, made some tests and found @app.message("hello")
def message_hello(message, client):
client.chat_postMessage(channel=message['channel'],
text=f"Hey there <@{message['user']}>!",
thread_ts=message['thread_ts'] )
@app.message("alpha")
def message_hello(message, say):
say(f"Hey there <@{message['user']}>, alpha!")
@app.message("beta")
def message_hello(message, say):
say(text=f"Hey there <@{message['user']}>, beta!", thread_ts = message['thread_ts'])
Is there a possibility of issues with timezones? I can check the bolt source-code when I get some time to dive-deep. |
Reproducible in:
The
slack_bolt
versionPython runtime version
Python 3.12.7
OS info
Steps to reproduce:
@app.message("hello")
and call say() with some textExpected result:
I want the message to be sent to "Chat" tab. This is where the user is, it doens't make sense to put this new message to history.
Actual result:
The message is going to "History" tab of the Slack bot. This is happening only in the Direct message. Deleting the entire history, reinstalling the app in workspace, using that "+New Chat" button, nothing fixes it.
However, this is not happening in channels. Probably because there is no "History" tab in channel.
This is not just seen in Slack App UI, but in Chrome, Firefox as well.
Requirements
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: