Reputation: 418
I cannot find an example of how to delete all chat messages of Teams app user with Bot. I'm trying to make MS Teams as ChatBot UI interface, and I need the functionality "Clear all messages." or "Start new conversation" where all messages would be deleted. Effectively this functionality should clear all chat messages with teams bot application.
I have tried to save messageID ( of user and chatbot), but only messages sent by the chatbot can be deleted from the conversation.
await context.deleteActivity(messageId);
The provided example works only for messages sent by the bot and not for messages sent by the user to the bot.
Upvotes: 0
Views: 339
Reputation: 10844
This functionality does not exist at all in Teams - Microsoft stores the conversation history on the user's behalf, and the bot can't access (or delete) the user's messages. Remember, Bot Framework bots can be used in various places, Teams is just one of them, so certain functionality exists in the API/SDK that does not apply to Teams.
Upvotes: 1