Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

botbuilder-core

Package Overview
Dependencies
Maintainers
1
Versions
539
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botbuilder-core - npm Package Compare versions

Comparing version 4.6.0 to 4.6.1

3

lib/botAdapter.d.ts

@@ -99,3 +99,4 @@ /**

*/
onTurnError: (context: TurnContext, error: Error) => Promise<void>;
get onTurnError(): (context: TurnContext, error: Error) => Promise<void>;
set onTurnError(value: (context: TurnContext, error: Error) => Promise<void>);
/**

@@ -102,0 +103,0 @@ * Adds middleware to the adapter's pipeline.

@@ -39,7 +39,7 @@ import { BotTelemetryClient } from './botTelemetryClient';

*/
readonly logPersonalInformation: boolean;
get logPersonalInformation(): boolean;
/**
* Gets the currently configured botTelemetryClient that logs the events.
*/
readonly telemetryClient: BotTelemetryClient;
get telemetryClient(): BotTelemetryClient;
/**

@@ -46,0 +46,0 @@ * Logs events based on incoming and outgoing activities using the botTelemetryClient class.

@@ -52,22 +52,22 @@ "use strict";

context.onSendActivities((ctx, activities, next2) => __awaiter(this, void 0, void 0, function* () {
// run full pipeline
// Run full pipeline.
const responses = yield next2();
activities.map((a, index) => {
const clonedActivity = this.cloneActivity(a);
if (index < responses.length) {
if (!clonedActivity.id) {
clonedActivity.id = responses[index].id;
// For certain channels, a ResourceResponse with an id is not always sent to the bot.
// This fix uses the timestamp on the activity to populate its id for logging the transcript.
// If there is no outgoing timestamp, the current time for the bot is used for the activity.id.
// See https://github.com/microsoft/botbuilder-js/issues/1122
if (!clonedActivity.id) {
if (clonedActivity.timestamp) {
clonedActivity.id = new Date(clonedActivity.timestamp).getTime().toString();
}
else {
clonedActivity.id = Date.now().toString();
}
}
if (!clonedActivity.id) {
clonedActivity.id = responses && responses[index] ?
responses[index].id :
undefined;
}
// For certain channels, a ResourceResponse with an id is not always sent to the bot.
// This fix uses the timestamp on the activity to populate its id for logging the transcript.
// If there is no outgoing timestamp, the current time for the bot is used for the activity.id.
// See https://github.com/microsoft/botbuilder-js/issues/1122
if (!clonedActivity.id) {
if (clonedActivity.timestamp) {
clonedActivity.id = new Date(clonedActivity.timestamp).getTime().toString();
}
else {
clonedActivity.id = Date.now().toString();
}
}

@@ -74,0 +74,0 @@ this.logActivity(transcript, clonedActivity);

@@ -472,3 +472,3 @@ /**

*/
readonly adapter: BotAdapter;
get adapter(): BotAdapter;
/**

@@ -484,3 +484,3 @@ * Gets the activity associated with this turn.

*/
readonly activity: Activity;
get activity(): Activity;
/**

@@ -503,12 +503,13 @@ * Indicates whether the bot has replied to the user this turn.

*/
get responded(): boolean;
/**
* Sets the response flag on the current turn context.
*
* @remarks
* The [sendActivity](xref:botbuilder-core.TurnContext.sendActivity) and
* [sendActivities](xref:botbuilder-core.TurnContext.sendActivities) methods call this method to
* update the responded flag. You can call this method directly to indicate that your bot has
* responded appropriately to the incoming activity.
*/
responded: boolean;
* Sets the response flag on the current turn context.
*
* @remarks
* The [sendActivity](xref:botbuilder-core.TurnContext.sendActivity) and
* [sendActivities](xref:botbuilder-core.TurnContext.sendActivities) methods call this method to
* update the responded flag. You can call this method directly to indicate that your bot has
* responded appropriately to the incoming activity.
*/
set responded(value: boolean);
/**

@@ -533,4 +534,4 @@ * Gets the services registered on this context object.

*/
readonly turnState: Map<any, any>;
get turnState(): Map<any, any>;
private emit;
}

@@ -5,3 +5,3 @@ {

"description": "Core components for Microsoft Bot Builder. Components in this library can run either in a browser or on the server.",
"version": "4.6.0",
"version": "4.6.1",
"license": "MIT",

@@ -25,3 +25,3 @@ "keywords": [

"assert": "^1.4.1",
"botframework-schema": "^4.6.0"
"botframework-schema": "^4.6.1"
},

@@ -42,3 +42,3 @@ "devDependencies": {

"clean": "erase /q /s .\\lib",
"set-version": "npm version --allow-same-version 4.6.0"
"set-version": "npm version --allow-same-version 4.6.1"
},

@@ -45,0 +45,0 @@ "files": [

@@ -50,3 +50,3 @@ /**

context.onSendActivities(async (ctx: TurnContext, activities: Partial<Activity>[], next2: () => Promise<ResourceResponse[]>) => {
// run full pipeline
// Run full pipeline.
const responses: ResourceResponse[] = await next2();

@@ -56,17 +56,17 @@

const clonedActivity = this.cloneActivity(a);
if (index < responses.length) {
if (!clonedActivity.id) {
clonedActivity.id = responses[index].id;
if (!clonedActivity.id) {
clonedActivity.id = responses && responses[index] ?
responses[index].id :
undefined;
}
// For certain channels, a ResourceResponse with an id is not always sent to the bot.
// This fix uses the timestamp on the activity to populate its id for logging the transcript.
// If there is no outgoing timestamp, the current time for the bot is used for the activity.id.
// See https://github.com/microsoft/botbuilder-js/issues/1122
if (!clonedActivity.id) {
if (clonedActivity.timestamp) {
clonedActivity.id = new Date(clonedActivity.timestamp).getTime().toString();
} else {
clonedActivity.id = Date.now().toString();
}
}
// For certain channels, a ResourceResponse with an id is not always sent to the bot.
// This fix uses the timestamp on the activity to populate its id for logging the transcript.
// If there is no outgoing timestamp, the current time for the bot is used for the activity.id.
// See https://github.com/microsoft/botbuilder-js/issues/1122
if (!clonedActivity.id) {
if (clonedActivity.timestamp) {
clonedActivity.id = new Date(clonedActivity.timestamp).getTime().toString();
} else {
clonedActivity.id = Date.now().toString();
}

@@ -73,0 +73,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc