microsoftgraph / microsoftgraph/microsoft-graph-comms-samples

Messages not always updating immediately with UpdateActivityAsync

Open
#105 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
253
Forks
275
Avg merge
1d 5h
Merged PRs (30d)
1

Description

Hi
I have various ongoing processes (like calls) which are being handled by my bot, and I want to provide updates about this to Teams users through the chat window. I want to do it in such a way that I avoid having stale information in the chat window, so rather than sending a new message each time the process updates, I send one initial message and then overwrite it each time the process has new information to share. That ensures every chat message (which is an adaptive card) always reflects the most up to date information.

I am doing this by caching the activity ID of the bot's initial message about a new process (sent using connector.Conversations.SendToConversationAsync) and sending updates to that message whenever the server has some new information to share about that process (using connector.Conversations.UpdateActivityAsync).

Sometimes this works as expected and the new card comes through almost immediately. In other instances, it either takes some time to update, or doesn't update until the user interacts with the card in some way ("liking" the message for example.)

Is this normal/just a limitation of Teams? Or is this expected to work immediately every time (in which case perhaps I am doing something wrong)?

Is there some way I can tell the Teams client to "flush" the message to ensure the changes are reflected straight away?

Thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the described SendToConversationAsync and UpdateActivityAsync flow, including how the activity ID is cached and reused. Determine whether delayed or interaction-triggered updates are expected Teams behavior or indicate an implementation issue; document the confirmed behavior and any supported way to ensure timely card updates.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.