Skip to content
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

port: TeamsInfo.sendMessageToTeamsChannel() doesn't return the correct ConversationReference #4144

Closed
sw-joelmut opened this issue Mar 4, 2022 · 0 comments · Fixed by #4145
Assignees
Labels
bug Indicates an unexpected problem or an unintended behavior. ExemptFromDailyDRIReport Use this label to exclude the issue from the DRI report. needs-triage The issue has just been created and it has not been reviewed by the team.

Comments

@sw-joelmut
Copy link
Collaborator

Version

4.15.0

Describe the bug

When calling the TeamsInfo.sendMessageToTeamsChannel method and reply to the new message thread, it replies to the first message sent to the bot instead of the new created one.
DotNet's reference

To Reproduce

Steps to reproduce the behavior:

  1. Use the javascript_nodejs/58.teams-start-new-thread-in-channel or typescript_nodejs/58.teams-start-new-thread-in-channel.
  2. Replace the use of the teamsCreateConversation method for TeamsInfo.sendMessageToTeamsChannel( ... ).
    this.onMessage( async ( context: TurnContext, next ): Promise<void> => {
       const teamsChannelId = teamsGetChannelId( context.activity );
       const activity = MessageFactory.text( 'This will be the first message in a new thread' ) as Activity;
       const [reference] = await TeamsInfo.sendMessageToTeamsChannel(context, activity, teamsChannelId, process.env.MicrosoftAppId);
    
       await context.adapter.continueConversationAsync(
           process.env.MicrosoftAppId,
           reference,
           async ( t ) => {
               await t.sendActivity( MessageFactory.text( 'This will be the first response to the new thread' ) );
           });
    
       await next();
    });
  3. Connect the bot to an MS Teams' channel.
  4. Call the bot in the channel conversation with @TeamsStartThreadInChannel.

Expected behavior

Should return the ConversationReference for the new message sent to the Teams' channel.

Additional context

Issue BotBuilder-Samples#3326

Screenshots

imagen
imagen

@sw-joelmut sw-joelmut added bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team. labels Mar 4, 2022
@sw-joelmut sw-joelmut added the ExemptFromDailyDRIReport Use this label to exclude the issue from the DRI report. label Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior. ExemptFromDailyDRIReport Use this label to exclude the issue from the DRI report. needs-triage The issue has just been created and it has not been reviewed by the team.
Projects
None yet
2 participants