-
Notifications
You must be signed in to change notification settings - Fork 286
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
Fix update_activity in messages #2101
base: main
Are you sure you want to change the base?
Conversation
@NeeluGeorge What is the reason for this? What is it solving? 'apply_conversation_reference' does this, except conditionally. |
@tracyboehrer 'apply_conversation_reference' is using reference.activity_id So our updated activity.id is left unused.This throws invalid ID error |
@NeeluGeorge Thanks for that. I'll dig a little. I note that the Python get_conversation_reference is different from the DotNet and JS implementations. |
@NeeluGeorge reference.activity_id should be TurnContext.activity.id. That happens in get_conversation_reference. But, Pythons get_conversation_reference is outdated, and that assignment should be conditional, which I will update. So doing this could potentially change that logic. That doc states the Activity passed to update_activity should have its id set to the incoming activity.reply_to_id. Is there a value for that property? |
Yes @tracyboehrer Sample code for updation ` async def post_updated_message(self):
` Error: ` ` reference = TurnContext.get_conversation_reference(self.activity) Here self.activity is having a different id. Only our updated_activity has id= 'reply_to_id' But this is left unused while creating reference |
@tracyboehrer |
In 4.15.1 there was a fix in CloudAdapter related to the id passed to update_activity. |
closes: OfficeDev/Microsoft-Teams-Samples#1226
Description
Python sdk documentation says to pass replyToId as updated_activity.id, but this was not getting passed to the reference created in update_activity
https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/update-and-delete-bot-messages?tabs=python#update-cards
Specific Changes
Added activity.id as the "activity_id" in reference