botbuilder-core
Advanced tools
Comparing version 4.6.2 to 4.7.0
@@ -51,3 +51,3 @@ /** | ||
/** | ||
* Creates a new AutoSaveStateiMiddleware instance. | ||
* Creates a new AutoSaveStateMiddleware instance. | ||
* @param botStates One or more BotState plugins to automatically save at the end of the turn. | ||
@@ -54,0 +54,0 @@ */ |
@@ -47,3 +47,3 @@ "use strict"; | ||
/** | ||
* Creates a new AutoSaveStateiMiddleware instance. | ||
* Creates a new AutoSaveStateMiddleware instance. | ||
* @param botStates One or more BotState plugins to automatically save at the end of the turn. | ||
@@ -50,0 +50,0 @@ */ |
import { Middleware } from './middlewareSet'; | ||
import { TurnContext } from './turnContext'; | ||
/** | ||
* Middleware that will send a typing indicator autmatically for each message. | ||
* Middleware that will send a typing indicator automatically for each message. | ||
* | ||
* @remarks | ||
* When added, this middleware will send typing activities back to the user when a Message activity | ||
* is receieved to let them know that the bot has received the message and is working on the response. | ||
* is received to let them know that the bot has received the message and is working on the response. | ||
* You can specify a delay in milliseconds before the first typing activity is sent and then a frequency, | ||
@@ -10,0 +10,0 @@ * also in milliseconds which determines how often another typing activity is sent. Typing activities |
@@ -21,7 +21,7 @@ "use strict"; | ||
/** | ||
* Middleware that will send a typing indicator autmatically for each message. | ||
* Middleware that will send a typing indicator automatically for each message. | ||
* | ||
* @remarks | ||
* When added, this middleware will send typing activities back to the user when a Message activity | ||
* is receieved to let them know that the bot has received the message and is working on the response. | ||
* is received to let them know that the bot has received the message and is working on the response. | ||
* You can specify a delay in milliseconds before the first typing activity is sent and then a frequency, | ||
@@ -68,3 +68,3 @@ * also in milliseconds which determines how often another typing activity is sent. Typing activities | ||
// Sending the Activity directly via the Adapter avoids other middleware and avoids setting the | ||
// responded flag. However this also requires tha tthe conversation reference details are explicitly added. | ||
// responded flag. However this also requires that the conversation reference details are explicitly added. | ||
const conversationReference = turnContext_1.TurnContext.getConversationReference(context.activity); | ||
@@ -105,3 +105,3 @@ typingActivity = turnContext_1.TurnContext.applyConversationReference(typingActivity, conversationReference); | ||
// Sending the Activity directly via the Adapter avoids other middleware and avoids setting the | ||
// responded flag. However this also requires tha tthe conversation reference details are explicitly added. | ||
// responded flag. However this also requires that the conversation reference details are explicitly added. | ||
const conversationReference = turnContext_1.TurnContext.getConversationReference(context.activity); | ||
@@ -108,0 +108,0 @@ typingActivity = turnContext_1.TurnContext.applyConversationReference(typingActivity, conversationReference); |
@@ -71,3 +71,3 @@ /** | ||
* @param conversationId Conversation Id. | ||
* @param continuationToken Continuatuation token to page through results. | ||
* @param continuationToken Continuation token to page through results. | ||
* @param startDate Earliest time to include. | ||
@@ -79,3 +79,3 @@ */ | ||
* @param channelId Channel Id. | ||
* @param continuationToken Continuatuation token to page through results. | ||
* @param continuationToken Continuation token to page through results. | ||
*/ | ||
@@ -82,0 +82,0 @@ listTranscripts(channelId: string, continuationToken?: string): Promise<PagedResult<TranscriptInfo>>; |
@@ -55,7 +55,5 @@ "use strict"; | ||
const clonedActivity = this.cloneActivity(a); | ||
if (!clonedActivity.id) { | ||
clonedActivity.id = responses && responses[index] ? | ||
responses[index].id : | ||
undefined; | ||
} | ||
clonedActivity.id = responses && responses[index] ? | ||
responses[index].id : | ||
clonedActivity.id; | ||
// For certain channels, a ResourceResponse with an id is not always sent to the bot. | ||
@@ -66,7 +64,8 @@ // This fix uses the timestamp on the activity to populate its id for logging the transcript. | ||
if (!clonedActivity.id) { | ||
const prefix = `g_${Math.random().toString(36).slice(2, 8)}`; | ||
if (clonedActivity.timestamp) { | ||
clonedActivity.id = new Date(clonedActivity.timestamp).getTime().toString(); | ||
clonedActivity.id = `${prefix}${new Date(clonedActivity.timestamp).getTime().toString()}`; | ||
} | ||
else { | ||
clonedActivity.id = Date.now().toString(); | ||
clonedActivity.id = `${prefix}${new Date().getTime().toString()}`; | ||
} | ||
@@ -73,0 +72,0 @@ } |
@@ -329,2 +329,5 @@ "use strict"; | ||
} | ||
if (o.id) { | ||
delete o.id; | ||
} | ||
return o; | ||
@@ -331,0 +334,0 @@ }); |
@@ -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.2", | ||
"version": "4.7.0", | ||
"license": "MIT", | ||
@@ -25,3 +25,3 @@ "keywords": [ | ||
"assert": "^1.4.1", | ||
"botframework-schema": "4.6.2" | ||
"botframework-schema": "4.7.0" | ||
}, | ||
@@ -43,3 +43,3 @@ "devDependencies": { | ||
"clean": "erase /q /s .\\lib", | ||
"set-version": "npm version --allow-same-version 4.6.2" | ||
"set-version": "npm version --allow-same-version 4.7.0" | ||
}, | ||
@@ -46,0 +46,0 @@ "files": [ |
@@ -53,3 +53,3 @@ /** | ||
/** | ||
* Creates a new AutoSaveStateiMiddleware instance. | ||
* Creates a new AutoSaveStateMiddleware instance. | ||
* @param botStates One or more BotState plugins to automatically save at the end of the turn. | ||
@@ -56,0 +56,0 @@ */ |
@@ -13,7 +13,7 @@ /** | ||
/** | ||
* Middleware that will send a typing indicator autmatically for each message. | ||
* Middleware that will send a typing indicator automatically for each message. | ||
* | ||
* @remarks | ||
* When added, this middleware will send typing activities back to the user when a Message activity | ||
* is receieved to let them know that the bot has received the message and is working on the response. | ||
* is received to let them know that the bot has received the message and is working on the response. | ||
* You can specify a delay in milliseconds before the first typing activity is sent and then a frequency, | ||
@@ -71,3 +71,3 @@ * also in milliseconds which determines how often another typing activity is sent. Typing activities | ||
// Sending the Activity directly via the Adapter avoids other middleware and avoids setting the | ||
// responded flag. However this also requires tha tthe conversation reference details are explicitly added. | ||
// responded flag. However this also requires that the conversation reference details are explicitly added. | ||
const conversationReference: Partial<ConversationReference> = | ||
@@ -114,3 +114,3 @@ TurnContext.getConversationReference(context.activity); | ||
// Sending the Activity directly via the Adapter avoids other middleware and avoids setting the | ||
// responded flag. However this also requires tha tthe conversation reference details are explicitly added. | ||
// responded flag. However this also requires that the conversation reference details are explicitly added. | ||
const conversationReference: Partial<ConversationReference> = TurnContext.getConversationReference(context.activity); | ||
@@ -117,0 +117,0 @@ typingActivity = TurnContext.applyConversationReference(typingActivity, conversationReference); |
@@ -55,7 +55,5 @@ /** | ||
const clonedActivity = this.cloneActivity(a); | ||
if (!clonedActivity.id) { | ||
clonedActivity.id = responses && responses[index] ? | ||
responses[index].id : | ||
undefined; | ||
} | ||
clonedActivity.id = responses && responses[index] ? | ||
responses[index].id : | ||
clonedActivity.id; | ||
@@ -67,8 +65,10 @@ // For certain channels, a ResourceResponse with an id is not always sent to the bot. | ||
if (!clonedActivity.id) { | ||
const prefix = `g_${Math.random().toString(36).slice(2,8)}`; | ||
if (clonedActivity.timestamp) { | ||
clonedActivity.id = new Date(clonedActivity.timestamp).getTime().toString(); | ||
clonedActivity.id = `${prefix}${new Date(clonedActivity.timestamp).getTime().toString()}`; | ||
} else { | ||
clonedActivity.id = Date.now().toString(); | ||
clonedActivity.id = `${prefix}${new Date().getTime().toString()}`; | ||
} | ||
} | ||
this.logActivity(transcript, clonedActivity); | ||
@@ -212,3 +212,3 @@ }); | ||
* @param conversationId Conversation Id. | ||
* @param continuationToken Continuatuation token to page through results. | ||
* @param continuationToken Continuation token to page through results. | ||
* @param startDate Earliest time to include. | ||
@@ -226,3 +226,3 @@ */ | ||
* @param channelId Channel Id. | ||
* @param continuationToken Continuatuation token to page through results. | ||
* @param continuationToken Continuation token to page through results. | ||
*/ | ||
@@ -229,0 +229,0 @@ listTranscripts(channelId: string, continuationToken?: string): Promise<PagedResult<TranscriptInfo>>; |
@@ -455,3 +455,3 @@ /** | ||
if (o.type !== ActivityTypes.Trace) { sentNonTraceActivity = true; } | ||
if (o.id) { delete o.id; } | ||
return o; | ||
@@ -458,0 +458,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
594615
12576
+ Addedbotframework-schema@4.7.0(transitive)
- Removedbotframework-schema@4.6.2(transitive)
Updatedbotframework-schema@4.7.0