File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/libraries/Builder/Microsoft.Agents.Builder Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ public async Task EndStreamAsync(CancellationToken cancellationToken = default)
300
300
}
301
301
}
302
302
303
- if ( ! string . IsNullOrEmpty ( Message ) || FinalMessage != null )
303
+ if ( UpdatesSent ( ) > 0 || FinalMessage != null )
304
304
{
305
305
await SendActivityAsync ( CreateFinalMessage ( ) , cancellationToken ) . ConfigureAwait ( false ) ;
306
306
}
@@ -312,7 +312,7 @@ private IActivity CreateFinalMessage()
312
312
var activity = FinalMessage ?? new Activity ( ) ;
313
313
314
314
activity . Type = ActivityTypes . Message ;
315
- activity . Text = Message ; // Teams won't allow Activity.Text changes
315
+ activity . Text = ! string . IsNullOrEmpty ( Message ) ? Message : "No text was streamed" ; // Teams won't allow Activity.Text changes or empty text
316
316
activity . Entities ??= [ ] ;
317
317
318
318
// make sure the supplied Activity doesn't have a streamInfo already.
You can’t perform that action at this time.
0 commit comments