microsoft / BotFramework-Services

Microsoft Bot Framework Services
Creative Commons Attribution 4.0 International
38 stars 11 forks source link

ShowTypingMiddleware not working in SLACK #332

Closed Anshul21 closed 2 years ago

Anshul21 commented 2 years ago

Is your feature request related to a problem? Please describe. show typing middleware doesn't work in slack.

Describe the solution you'd like Expected behavior is to see bot is typing so that user knows bot has received the message.

Describe alternatives you've considered n/a

stevkan commented 2 years ago

@Anshul21, I am able to repro the issue. I am attempting to identify where the problem is originating from and if there is a possible workaround. I will update you when I know more.

Anshul21 commented 2 years ago

@stevkan any ETA on this? this will help us plan our releas. Thanks

stevkan commented 2 years ago

@Anshul21, thank you for your patience while I try to isolate why this is happening. I can see where I believe this is failing though the why is eluding me, at the moment. Out of curiosity, if you simply pass in a 'typing' activity, does that get picked up by Slack?

await turnContext.sendActivities([
     { type: ActivityTypes.Typing },
     { type: 'delay', value: 500 },
]);
Anshul21 commented 2 years ago

@stevkan i tried, it didnt work .

stevkan commented 2 years ago

@Anshul21, thank you for your patience. I can see that the typing activity appears to be processed but it also seems as though it is getting bypassed as new activities are coming in behind it. I seem to be getting the same result whether using the 'showTypingMiddleware()' or just sending a typing activity after every activity in the 'adapter.processActivity()` method. I'm digging deeper and hope to have more of a response soon.

stevkan commented 2 years ago

@Anshul21, I tested this with a colleague and what we were able to determine is the typing activity, whether from the middleware or as an independent activity, is not being honored when sent to Slack. I am unsure if the issue is on the BotFramework Services side or something with Slack, itself.

@Services team - who would be the right person to own this item for further investigating?

bobokids commented 2 years ago

Shiyi, could you help to take a look?

ssss141414 commented 2 years ago

Investigating.

ssss141414 commented 2 years ago

@Anshul21 Sorry for the late reply, since we are fixing some issues in our Slack webjob these months.

User-typing is a Slack RTM only API. According to Slack official document, new Slack app may not use any RTM API. Also in our side, we also don't support RTM API for bot later than 2019.

If Slack publish a user_typing Events API in the future, we will go to support this feature.

Reference: https://api.slack.com/events