Repository navigation
Conversation
Tiny Code Reviewthe AI provider rate-limited the request This is advice, not a gate. Re-run with the |
unRekable
left a comment
There was a problem hiding this comment.
Code Review
🟢 No findings.
The change fills the existing, optional ConversationInfo.link for Teams using Microsoft's documented deep-link forms, and reworks message_link to take the placed channel from the message payload and name a reply's post as parentMessageId. The design holds: share_link mirrors the pre-existing call_link pattern in the same adapter (same group:{team} note lookup, same escaped()), no protocol field changes (ConversationInfo.link already has serde(default) and is skipped when empty), and nothing new is fetched or opened by chatd. parse_share is groundwork with no production caller yet, but it is exercised by a round-trip unit test, the prove driver and the e2e scenario, and no defect was found in the diff.
Residual risk
- parse_share, ShareTarget and team_share have no caller outside tests and the prove driver; the 'a Teams link opens here' half of the title lands with a later change, and the parse input should then get the same cap treatment the rest of the wire has.
- The exact query parameters (ngc=true, allowXTenantAccess=true, parentMessageId, the meetup-join form) are taken from Microsoft's docs and are unverified against a live tenant; a wrong form sends a copied link to the wrong place, which the PR body itself names as the risk.
- Message::bound clips forwarded.link but not MessageKind::Unsupported.link; the diff sources more of that link from the message's conversationLink (a value that already flows through the read path on main), so a hostile tenant could make it long until a clip exists.
The info pane copies Microsoft's documented form for a chat and a channel. A message link uses the same form, and a reply names its post. Each link parses back to the place it came from. Closes #641
acf4c9b to
9ca30d0
Compare
What changed and why
A Teams chat or channel now has a copyable link in the info pane, using Microsoft's documented
https://teams.microsoft.com/l/…forms. A channel message link uses the same form, and a reply includes its post asparentMessageId. Those addresses parse back to the chat, channel, message or team, including themsteams:form. A link that starts a new chat, or that is not a Teams link, is left alone.The message menu's Copy link, opening a Teams link inside the app, and a link on a team in the space list stay with the shell. This change fills the conversation link the info pane already shows, and builds the message and team addresses the adapter can name.
Type
Platforms
Proof
Scenario: e2e/scenarios/teams-copy-link
Lab run: not run
Compatibility
No protocol field was added.
ConversationInfo.linkwas already there and was empty for Teams. An older client still ignores a link it does not show. An older chatd ignoresTINYCLIENT_PROVE=teams-copy-linkand keeps serving, so the scenario fails on that build.Risk and rollback
A wrong link would open the wrong place in the official Teams app when someone copies it. Revert this change.
Release note
A Teams chat or channel can be copied as a link that opens that place in Teams.
How tested
cargo test -p chatd --no-default-featuresfor the new link round trip, for a channel page's existing message link, and for the info pane of a channel and a group chat.cargo clippy -p chatd --no-default-features --all-targetsis clean.What was not tested
A live Teams tenant. The lab has not recorded e2e/scenarios/teams-copy-link. The message menu, opening a link inside the app, and a team link in the space list were left as they are.