Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit faacc99

Browse files
author
Anish Prasad
authored
fix: Custom Question Answering in MS Teams (#6603)
* Add TryParse to check if the incoming object can be cast to int64 or set 0 if not * Remove extra spaces
1 parent 7d9eb99 commit faacc99

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libraries/Microsoft.Bot.Builder.AI.QnA/Dialogs/QnAMakerDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ private static void ResetOptions(DialogContext dc, QnAMakerDialogOptions dialogO
650650

651651
if (qnaIdFromContext != null)
652652
{
653-
dialogOptions.QnAMakerOptions.QnAId = (int)(long)qnaIdFromContext;
653+
dialogOptions.QnAMakerOptions.QnAId = long.TryParse(qnaIdFromContext.ToString(), out long qnaId) ? (int)qnaId : 0;
654654
}
655655
else
656656
{

0 commit comments

Comments
 (0)