Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got rid of node Buffer() deprecation warnings. #1426

Merged
merged 1 commit into from
Apr 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [client] Fixed issue where cancelling out of opening a transcript was creating a broken livechat window in PR [1441](https://github.com/Microsoft/BotFramework-Emulator/pull/1441)
- [client] Fixed invisible scrollbar styling in log panel in PR [1442](https://github.com/Microsoft/BotFramework-Emulator/pull/1442)
- [main] Fixed issue where opening a livechat or bot via protocol wasn't working because ngrok wasn't being started on startup in PR [1446](https://github.com/Microsoft/BotFramework-Emulator/pull/1446)
- [main / client] Got rid of node Buffer() deprecation warnings in PR [1426](https://github.com/Microsoft/BotFramework-Emulator/pull/1426)

## Removed
- [main] Removed custom user agent string from outgoing requests in PR [1427](https://github.com/Microsoft/BotFramework-Emulator/pull/1427)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function startConversation(botEmulator: BotEmulator) {
const botEndpoint: BotEndpoint = (req as any).botEndpoint;
const conversationId =
onErrorResumeNext(() => {
const optionsJson = new Buffer(tokenMatch[1], 'base64').toString('utf8');
const optionsJson = Buffer.from(tokenMatch[1], 'base64').toString('utf8');

return JSON.parse(optionsJson).conversationId;
}) || uniqueId();
Expand Down
6 changes: 3 additions & 3 deletions packages/emulator/core/src/facility/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,12 +526,12 @@ export default class Conversation extends EventEmitter {
};

const paymentTokenHeaderStr = JSON.stringify(paymentTokenHeader);
const pthBytes = new Buffer(paymentTokenHeaderStr).toString('base64');
const pthBytes = Buffer.from(paymentTokenHeaderStr).toString('base64');

const paymentTokenSource = 'tok_18yWDMKVgMv7trmwyE21VqO';
const ptsBytes = new Buffer(paymentTokenSource).toString('base64');
const ptsBytes = Buffer.from(paymentTokenSource).toString('base64');

const ptsigBytes = new Buffer('Emulator').toString('base64');
const ptsigBytes = Buffer.from('Emulator').toString('base64');

const updateValue: PaymentRequestComplete = {
id: request.id,
Expand Down