Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Conversation

@tracyboehrer
Copy link
Member

Fixes #891

Also brought to parity with:

            // log incoming activity at beginning of turn
            if (turnContext.Activity != null)
            {
                turnContext.Activity.From ??= new ChannelAccount();

                if (string.IsNullOrEmpty((string)turnContext.Activity.From.Properties["role"]) && string.IsNullOrEmpty(turnContext.Activity.From.Role))
                {
                    turnContext.Activity.From.Role = RoleTypes.User;
                }

                // We should not log ContinueConversation events used by skills to initialize the middleware.
                if (!(turnContext.Activity.Type == ActivityTypes.Event && turnContext.Activity.Name == ActivityEventNames.ContinueConversation))
                {
                    LogActivity(transcript, CloneActivity(turnContext.Activity));
                }
            }

@LeeParrishMSFT LeeParrishMSFT merged commit 4777708 into main Mar 15, 2021
@LeeParrishMSFT LeeParrishMSFT deleted the trboehre/fromrole branch March 15, 2021 15:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

port: Update TranscriptLoggerMiddleware set turnContext.Activity.From.Role (#5064)

3 participants