Skip to content

Commit 693f234

Browse files
author
Tom Laird-McConnell
authored
add warning (#3783)
1 parent d55f111 commit 693f234

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Node/core/src/bots/ChatConnector.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ var MAX_DATA_LENGTH = 65000;
5252

5353
var USER_AGENT = "Microsoft-BotFramework/3.1 (BotBuilder Node.js/" + pjson.version + ")";
5454

55+
var StateApiDreprecatedMessage = "The Bot State API is deprecated. Please refer to https://aka.ms/I6swrh for details on how to replace with your own storage.";
56+
5557
export interface IChatConnectorSettings {
5658
appId?: string;
5759
appPassword?: string;
@@ -355,8 +357,11 @@ export class ChatConnector implements IConnector, IBotStorage {
355357
this.authenticatedRequest(options, (err, response, body) => done(err));
356358
}
357359

360+
358361
public getData(context: IBotStorageContext, callback: (err: Error, data: IChatConnectorStorageData) => void): void {
359362
try {
363+
console.warn(StateApiDreprecatedMessage);
364+
360365
// Build list of read commands
361366
var root = this.getStoragePath(context.address);
362367
var list: any[] = [];
@@ -437,6 +442,7 @@ export class ChatConnector implements IConnector, IBotStorage {
437442
}
438443

439444
public saveData(context: IBotStorageContext, data: IChatConnectorStorageData, callback?: (err: Error) => void): void {
445+
console.warn(StateApiDreprecatedMessage);
440446
var list: any[] = [];
441447
function addWrite(field: string, botData: any, url: string) {
442448
var hashKey = field + 'Hash';

0 commit comments

Comments
 (0)