Summary
- I am using the Bot Framework REST API to create and update Microsoft Teams posts.
- I have found that I can only update the last two posts of a conversation, but cannot find documentation that describes this restriction.
- It is not possible to identify the failed updates from the API response, as the HTTP response code and body is always the same, regardless of whether the update works or not (200 with the id of the "updated" activity). I would expect the response to indicate the failure, and so this appears to be a Teams bug.
Detail
I can create conversations and create replies to conversations using the Bot Framework REST API without issue (using the create conversation and send to conversation endpoints). My problem arises if I try to update these messages.
Given a conversation that looks like this:
parent_message
|_ child_message_1
|_ child_message_2
|_ child_message_3
If I attempt to use the update activty endpoint to update each one of these messages, I observe that:
- I can always update
parent_message
. - I can update
child_message_3
andchild_message_2
, but notchild_message_1
. In each case the HTTP response is a successful HTTP response (200 response code, with a JSON body that contains the id of the updated message), regardless of whether the update succeeds or not. - If I add another message,
child_message_4
, then this will be updatable, butchild_message_2
will no longer be updatable. I assume this is because nowchild_message_2
is no longer one of the last two messages.
I see the same behavior if another user adds messages to the conversation, ie. if a user were to make two posts to the conversation I would no longer be able to update any of my own child messages as they are no longer one of the last two messages.
My questions are:
- Does anyone know if this restriction is by design? If so, can you point to some documentation on this?
- Is it possible to determine when an update fails? As mentioned, the HTTP response always reports success so I'm unable to find a way to do this. Is this a bug in Teams?