Comments (15)
I dug into this a bit. It seems inviting users to existing DMs/MPDMs is a relatively new feature, and it looks like bots/apps were excluded from the initial implementation of this new feature.
I have filed a feature request to extend this ability to apps/bots as well.
from java-slack-sdk.
Appreciated @filmaj !!!
from java-slack-sdk.
If you are receiving channel_not_found
when passing the channel ID, then I do not think your app has the correct scope for being able to 'see' this channel. Is it a direct message between a single user and the app, or a multi-person direct message?
Can you post all the scopes your app has?
from java-slack-sdk.
It is a multi-person direct message. My app has the following scopes:
"scopes": {
"user": [
"chat:write"
],
"bot": [
"app_mentions:read",
"calls:read",
"calls:write",
"channels:history",
"channels:join",
"channels:read",
"chat:write",
"chat:write.customize",
"chat:write.public",
"commands",
"conversations.connect:read",
"conversations.connect:write",
"groups:history",
"groups:read",
"groups:write",
"im:history",
"im:read",
"im:write",
"mpim:history",
"mpim:read",
"users.profile:read",
"users:read",
"users:read.email",
"mpim:write",
"mpim:write.invites"
]
}
from java-slack-sdk.
@kranti-rh I see your app uses both user and bot scopes. This means your app will be issued multiple tokens depending on the situation. Are you sure you are using the bot token, which includes the mpim:read
scope, when calling conversations.info
? Perhaps you are using the user token, which does not have the relevant required scope?
from java-slack-sdk.
yes, i'm using the bot token while calling conversations.info
.
from java-slack-sdk.
Hmm, hold on.. re-reading what you said initially:
I'm @ mentioning the bot app in a direct message channel but it doesn't respond in the same way as it does in the channel where you get a modal asking if you want to invite it.
Can you clarify whether your app is a member of the MPDM or not? Are you expecting that the app will be auto-invited into the DM?
If the app is NOT a part of the MPDM, then conversations.info
will always return channel_not_found
when providing the conversation ID of the MPDM.
from java-slack-sdk.
Channel membership is a pre-requisite for many conversation APIs. Given the private nature of DM and MPDM conversations, if the user or app whose access token you are using is not a member in these conversations to begin with, then any API that interacts with this conversation will fail or error out (admin tokens are the exception but that is not at play here). This is to ensure privacy and security.
from java-slack-sdk.
Hmm, hold on.. re-reading what you said initially:
I'm @ mentioning the bot app in a direct message channel but it doesn't respond in the same way as it does in the channel where you get a modal asking if you want to invite it.
Can you clarify whether your app is a member of the MPDM or not? Are you expecting that the app will be auto-invited into the DM?
If the app is NOT a part of the MPDM, then
conversations.info
will always returnchannel_not_found
when providing the conversation ID of the MPDM.
No, isn't a member of the MPDM. Yes, I expect that the app should be auto-invited into the MPDM like it happens in channels. Could you please confirm if it is possible or not?
from java-slack-sdk.
That is NOT the case for DMs or MPDMs. Because of the private nature of these conversations, simply mentioning the app name in a direct message will not auto-invite the app. An end-user has to explicitly invite the bot into a conversations. It may also be possible to open (i.e. start) an MPDM with a bot token via the conversations.open
API but I haven't personally experimented with that API myself.
from java-slack-sdk.
@filmaj Yes, using conversations.open i was able to start a new private conversation but this is not the solution I'm looking for. My problem is with existing conversations, in those how I can add bot application. Being an end-user I'm not able to invite the bot into the existing DMs or MPDMs conversations.
from java-slack-sdk.
Yes you are correct. It seems you must create a new conversation explicitly with a bot.
from java-slack-sdk.
@filmaj I was just wondering to know that how long this thing gonna take to get fixed.
from java-slack-sdk.
It is a feature request that is being weighed and prioritized by the relevant team. There is no specific timeline but whenever I hear more I will update this issue. It is best not to have any expectations on a timeline at this moment.
from java-slack-sdk.
@filmaj cool!
from java-slack-sdk.
Related Issues (20)
- Before/after oauth hooks in Java SDK? HOT 2
- Why doesn't try-catch help catch the exception when the app is run from within a JAR? HOT 3
- Add support for micronaut 4 HOT 1
- Make saveBot required in the InstallationService interface HOT 4
- Request for Slack api WebhookResponse send(String url, Payload payload) to return ts value HOT 2
- Can we make multiUsersSelect dropdown mandatory, if required? HOT 2
- busy to open/close a connection when running slack socket mode for days HOT 28
- RichTextSectionElement.Broadcast does not have style property HOT 2
- Use MultiTeamAuthorization when making slack api requests without an event HOT 8
- auth.test API timeout with SSLException in develop environment but works fine in local HOT 3
- HTTP4K Duplicate Header exception HOT 3
- Field mismatch with to response. HOT 6
- A bug on the metric calculation inside async API clients
- Add slack_file object to image block / block element classes
- AsyncMethodsRateLimiter does not handle ratelimitted errors properly HOT 3
- Append `thread_ts` to the payload of a lazy listener in Slash Commands HOT 1
- Kotlin extension should be populated with an earlier api target HOT 4
- Fail to run event listeners for app_mention events with bot_message subtype HOT 1
- Slack mobile shows "Unable to show preview" despite fallback text() being present HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-slack-sdk.