Skip to content

feat: add support for ctx.delete#356

Draft
lilyydu wants to merge 3 commits intomainfrom
feat/ctx-delete
Draft

feat: add support for ctx.delete#356
lilyydu wants to merge 3 commits intomainfrom
feat/ctx-delete

Conversation

@lilyydu
Copy link
Copy Markdown
Collaborator

@lilyydu lilyydu commented Apr 3, 2026

partially resolves: #338
old pr: #343 (abandoned, had to cherry pick due to removal of prev commits)

previously, the only way to delete an activity was directly calling
await app.api.conversations.activities(conversation_reference.conversation.id).delete(conversation_reference.activity_id)

this wasn't very consistent with our flow for sending and updating activities (via send). hence, we are now adding ctx.delete(activity_id) to ActivityContext for deleting a bot activity.

NOTE: We previously had MessageDeleteActivityInput but this was an invalid type on POST/PUT. Delete is a separate verb and needs its own path.

This only partially resolves the issue named above. In addition to this change, I think we should make it more explicit in our docs.

Details:

  • Proactive deletion supported via optional conversation_ref (same pattern as ctx.send())
  • Targeted activities supported via targeted=True (experimental, emits ExperimentalTeamsTargeted warning)
  • Routes to DELETE /v3/conversations/{id}/activities/{activityId} — no body, success = no exception

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Updating/deleting messages is not clear

1 participant