File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
libraries/botbuilder-core/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ export class TelemetryLoggerMiddleware implements Middleware {
188188 protected async fillReceiveEventProperties ( activity : Activity , telemetryProperties ?: { [ key : string ] :string } ) : Promise < { [ key : string ] : string } > {
189189 const properties : { [ key : string ] : string } = { } ;
190190
191- properties [ this . telemetryConstants . fromIdProperty ] = activity . from . id || '' ;
191+ properties [ this . telemetryConstants . fromIdProperty ] = activity . from ? activity . from . id : '' ;
192192 properties [ this . telemetryConstants . conversationNameProperty ] = activity . conversation . name || '' ;
193193 properties [ this . telemetryConstants . localeProperty ] = activity . locale || '' ;
194194 properties [ this . telemetryConstants . recipientIdProperty ] = activity . recipient . id ;
@@ -197,8 +197,8 @@ export class TelemetryLoggerMiddleware implements Middleware {
197197 // Use the LogPersonalInformation flag to toggle logging PII data, text and user name are common examples
198198 if ( this . logPersonalInformation ) {
199199
200- if ( activity . from . name && activity . from . name . trim ( ) ) {
201- properties [ this . telemetryConstants . fromNameProperty ] = activity . from . name ;
200+ if ( activity . from && activity . from . name && activity . from . name . trim ( ) ) {
201+ properties [ this . telemetryConstants . fromNameProperty ] = activity . from ? activity . from . name : '' ; ;
202202 }
203203
204204 if ( activity . text && activity . text . trim ( ) ) {
You can’t perform that action at this time.
0 commit comments