Skip to content
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Entity } from '@microsoft/agents-activity';
import { Activity, Entity } from '@microsoft/agents-activity';
Comment thread
joratz marked this conversation as resolved.

/**
* Represents an email response entity to be sent back.
Expand Down Expand Up @@ -29,3 +29,15 @@ export function createEmailResponse(htmlBody?: string): EmailResponse {
htmlBody: htmlBody ?? '',
};
}

Comment thread
joratz marked this conversation as resolved.
/**
* Creates an activity with an EmailResponse entity
* @param emailResponseHtmlBody - (Optional) The HTML body content for the email response
* @returns A message activity containing the EmailResponse entity
*/
export function createEmailResponseActivity(emailResponseHtmlBody?: string): Activity {
return Activity.fromObject({
type: 'message',
entities: [createEmailResponse(emailResponseHtmlBody)]
});
}
Loading