Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
from typing import Literal
from microsoft_agents.activity.activity import Activity
from microsoft_agents.activity.entity import Entity


class EmailResponse(Entity):
type: Literal["emailResponse"] = "emailResponse"
html_body: str = ""

@staticmethod
def create_email_response_activity(email_response_html_body: str) -> Activity:
"""Create a new Activity with an EmailResponse entity.

Args:
email_response_html_body: The HTML content for the email response.

Returns:
A new Activity instance with type='message' and the EmailResponse entity attached.
"""
working_activity = Activity(type="message")
email_response = EmailResponse(html_body=email_response_html_body)
if working_activity.entities is None:
working_activity.entities = []
working_activity.entities.append(email_response)
return working_activity
Loading