Forum Discussion
AyeshaKulsumSJ
Sep 09, 2022Brass Contributor
Reply to message is not working as expected
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:
Actual :
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.
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?
- Sayali-MSFT
Microsoft
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?- abdolianCopper ContributorThe 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- Sayali-MSFT
Microsoft
abdolian - Please have look into this sample-Microsoft-Teams-Samples/samples/bot-initiate-thread-in-channel at main · OfficeDev/Microsoft-Teams-Samples (github.com)
- Sayali-MSFT
Microsoft
AyeshaKulsumSJ -Did you get chance to check?- AyeshaKulsumSJBrass Contributor
We referred this document and the issue is fixed
- Sayali-MSFT
Microsoft
AyeshaKulsumSJ - We are looking into this we will get back to you soon.