SOLVED

Reply to message is not working as expected

Brass Contributor
const {
MessageFactory,
TeamsActivityHandler, BotFrameworkAdapter, TurnContext,
teamsGetChannelId,
TeamsInfo
} = require('botbuilder');
const properties = {
'membersAdded': [{ 'id': '28:17a' }], 'type': 'conversationUpdate''timestamp': '2022-08-11T10:54:30.482Z''id': 'f:ce9c82ab7a6feabc''channelId': 'msteams''serviceUrl': 'https://smba.trafficmanager.net/in/''from': { 'id': '29:1YqsjLwgg-0A_V8tL5P3hIw''aadObjectId': 'a0858f3e-d57759' }, 'conversation': {
'isGroup': true'conversationType': 'channel''tenantId': '3272b84e1''id': '19:PZppMpIo1@thread.tacv2'
}, 'recipient': { 'id': '28:17720bfc7ba''name': 'bot 1' }, 'channelData': {
'team': { 'aadGroupId': '9ffd4120579''name': 'Ayesha Testing''id': '19:PZp9pIo1@thread.tacv2' }, 'eventType': 'teamMemberAdded''tenant': { 'id': '3284e1' }, 'settings': { 'selectedChannel': { 'id': '19:PZ1@thread.tacv2' } }
}
};
const BotConnector = require('botframework-connector');
const adapter = new BotFrameworkAdapter({
appId: '',
appPassword: ''
});
 
BotConnector.MicrosoftAppCredentials.trustServiceUrl(properties.serviceUrl);
const context = new TurnContext(adapter, properties);
const teamsChannelId = '19:PZpplOG9xxoOHhanG9pIo1@thread.tacv2';
console.log(teamsChannelId);
const activity = MessageFactory.text('This will be the first message in a new thread');
const [reference] = await TeamsInfo.sendMessageToTeamsChannel(context, activity, teamsChannelId, process.env.MicrosoftAppId);

await context.adapter.continueConversationAsync( reference, async turnContext => {
await turnContext.sendActivity(MessageFactory.text('This will be the first response to the new thread'));
});
 
Expected:
AyeshaKulsumSJ_0-1662968863177.png

 

Actual :

AyeshaKulsumSJ_1-1662968885026.png

 

When I want to send a Reply to the message but it is sending as a new message. And I have to update that reply message that certain times. Can you please look into that? Also Is there a way to batch send or update messages to users in personal chat, otherwise data might be inconsistent for users.
7 Replies
@AyeshaKulsumSJ - We are looking into this we will get back to you soon.
best response confirmed by AyeshaKulsumSJ (Brass Contributor)
Solution

@AyeshaKulsumSJ -We are not able to repro the scenario. It is working fine from our end.
Reference sample-BotBuilder-Samples/TeamsStartNewThreadInTeam.cs at main · microsoft/BotBuilder-Samples (github.com)
Microsoft Teams Version 1.5.00.24706 (64-bit)-E.
Could you please check it once?
channel.png

@AyeshaKulsumSJ -Did you get chance to check?
The link doesn't work.
I have same problem and I couldn't find any true solution to reply a message by bot. Please share a real example of this issue in Javascript

Thanks, Can I do this for a group chat? Could you please send a sample code for group chat?

1 best response

Accepted Solutions
best response confirmed by AyeshaKulsumSJ (Brass Contributor)
Solution

@AyeshaKulsumSJ -We are not able to repro the scenario. It is working fine from our end.
Reference sample-BotBuilder-Samples/TeamsStartNewThreadInTeam.cs at main · microsoft/BotBuilder-Samples (github.com)
Microsoft Teams Version 1.5.00.24706 (64-bit)-E.
Could you please check it once?
channel.png

View solution in original post