microsoft / BotFramework-Services

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

OnMembersAddedAsync method is not getting triggered when someone is added to a group chat in the GroupMe channel #97

Closed anusharr closed 4 years ago

anusharr commented 5 years ago

I created a Web App Bot with the Echo Bot template on Azure and connected it to the GroupMe channel. Created a new group on GroupMe and added the bot to the group.

public class EchoBot : ActivityHandler
    {
        protected override async Task OnMessageActivityAsync(ITurnContext<IMessageActivity> turnContext, CancellationToken cancellationToken)
        {
            await turnContext.SendActivityAsync(MessageFactory.Text($"Echo: {turnContext.Activity.Text}"), cancellationToken);
        }

        protected override async Task OnMembersAddedAsync(IList<ChannelAccount> membersAdded, ITurnContext<IConversationUpdateActivity> turnContext, CancellationToken cancellationToken)
        {
            foreach (var member in membersAdded)
            {
                if (member.Id != turnContext.Activity.Recipient.Id)
                {
                    await turnContext.SendActivityAsync(MessageFactory.Text($"Hello and welcome!"), cancellationToken);
                }
            }
        }
    }

gh1_LI (2) gh22

[bug]

v-kydela commented 5 years ago

The GroupMe connector appears to be sending those events to the bot as message activities rather than conversation update activities

sphanley commented 5 years ago

Any expected ETA on a fix for this issue? I reported it as #94 back in July - because of the fact that these messages are coming through as message activities rather than conversation update activities, the ID(s) of the added user(s) aren't present on the message, which really limits the ability to directly interact with those users when they join the chat.

As an aside - it's worth mentioning that GroupMe sends slightly different system messages for the following three scenarios:

mickeydjw commented 5 years ago

Assigning to myself for tracking purposes. @sphanley I'll update you with an ETA here once I have more info for you.

sphanley commented 5 years ago

Thanks @mickeydjw! I really appreciate the support.

mickeydjw commented 4 years ago

@sphanley I haven't forgotten about you. We're working on finding the right folks for help with the groupme issues.

sphanley commented 4 years ago

I appreciate the update @mickeydjw! I know how hard it can be sometimes to work across multiple teams and services. I'm looking forward to eventual movement on this and #101!

getangar commented 4 years ago

Hi there, I'm sorry if this is not the proper way to attach my request too. But the same issue happens also with the Web Chat channel.

anusharr commented 4 years ago

@getangar, please open a new issue in the Web Chat repo and explain your issue in detail. Thanks!

arturl commented 4 years ago

Thank you for the issue report and working with us to get to the detail. We've evaluated the issue and determined that it doesn't fit in our current semester's schedule. We have added it to our backlog for future planning, but do not have an ETA to offer at this time.