Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
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
Expand Up @@ -85,9 +85,6 @@ public SetProperties([CallerFilePath] string callerPath = "", [CallerLineNumber]
dc.State.SetValue(propValue.Property.GetValue(dc.State), value);
}

// save all state scopes to their respective botState locations.
await dc.Context.TurnState.Get<DialogStateManager>().SaveAllChangesAsync(cancellationToken).ConfigureAwait(false);

return await dc.EndDialogAsync(cancellationToken: cancellationToken).ConfigureAwait(false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ public SetProperty([CallerFilePath] string callerPath = "", [CallerLineNumber] i

dc.State.SetValue(this.Property.GetValue(dc.State), value);

// save all state scopes to their respective botState locations.
await dc.Context.TurnState.Get<DialogStateManager>().SaveAllChangesAsync(cancellationToken).ConfigureAwait(false);

return await dc.EndDialogAsync(cancellationToken: cancellationToken).ConfigureAwait(false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Threading.Tasks;
using AdaptiveExpressions.Properties;
using Microsoft.Bot.Builder.Dialogs.Adaptive.Conditions;
using Microsoft.Bot.Builder.Dialogs.Memory;
using Microsoft.Bot.Schema;
using Newtonsoft.Json;

Expand Down Expand Up @@ -312,7 +313,7 @@ private async Task SendOAuthCardAsync(DialogContext dc, IMessageActivity prompt,
// Save state prior to sending OAuthCard: the invoke response for a token exchange from the root bot could come in
// before this method ends or could land in another instance in scale-out scenarios, which means that if the state is not saved,
// the OAuthInput would not be at the top of the stack, and the token exchange invoke would get discarded.
await dc.Context.TurnState.Get<ConversationState>().SaveChangesAsync(dc.Context, false, cancellationToken).ConfigureAwait(false);
await dc.Context.TurnState.Get<DialogStateManager>().SaveAllChangesAsync(cancellationToken).ConfigureAwait(false);

// Prepare OAuthCard
var title = Title == null ? null : await Title.GetValueAsync(dc, cancellationToken).ConfigureAwait(false);
Expand Down