Skip to content

Commit

Permalink
Fixed issue where BOM wasn't being stripped from transcripts opened v…
Browse files Browse the repository at this point in the history
…ia the File menu.
  • Loading branch information
tonyanziano committed Apr 12, 2019
1 parent 731978d commit 12c9710
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [client] Fixed secret prompt dialog's opaque background so that it is now transparent in PR [1407](https://github.com/Microsoft/BotFramework-Emulator/pull/1407)
- [build / client] Fixed ipc issue that was breaking the command service in PR [1418](https://github.com/Microsoft/BotFramework-Emulator/pull/1418)
- [build] Bumped electron version to v4.1.1 and updated .dmg installer background image in PR [1419](https://github.com/Microsoft/BotFramework-Emulator/pull/1419)
- [client] Fixed issue where BOM wasn't being stripped from transcripts opened via the File menu in PR [1425](https://github.com/Microsoft/BotFramework-Emulator/pull/1425)

## v4.3.3 - 2019 - 03 - 14
## Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/app/main/src/commands/emulatorCommands.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ jest.mock('chokidar', () => ({

jest.mock('fs-extra', () => ({
stat: async () => ({ isFile: () => true }),
readFile: async () => JSON.stringify((mockConversation as any).transcript),
}));

jest.mock('mkdirp', () => ({
Expand All @@ -94,6 +93,7 @@ jest.mock('../utils', () => ({
writeFile: async () => true,
loadSettings: () => ({ windowState: {} }),
getThemes: async () => [],
readFileSync: () => JSON.stringify((mockConversation as any).transcript),
}));

jest.mock('../utils/ensureStoragePath', () => ({
Expand Down
4 changes: 2 additions & 2 deletions packages/app/main/src/commands/emulatorCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { getActiveBot, getBotInfoByPath, patchBotsJson, toSavableBot } from '../
import { emulator } from '../emulator';
import { mainWindow } from '../main';
import { dispatch, getStore as getSettingsStore } from '../settingsData/store';
import { parseActivitiesFromChatFile, showSaveDialog, writeFile } from '../utils';
import { parseActivitiesFromChatFile, showSaveDialog, writeFile, readFileSync } from '../utils';
import { cleanupId as cleanupActivityChannelAccountId, CustomActivity } from '../utils/conversation';
import { botProjectFileWatcher } from '../watchers';
import { TelemetryService } from '../telemetry';
Expand Down Expand Up @@ -125,7 +125,7 @@ export function registerCommands(commandRegistry: CommandRegistryImpl) {
throw new Error(`${Commands.FeedTranscriptFromDisk}: File ${filePath} not found.`);
}

const activities = JSON.parse(await fs.readFile(transcriptPath, 'utf-8'));
const activities = JSON.parse(readFileSync(transcriptPath));

await mainWindow.commandService.call(
Commands.FeedTranscriptFromMemory,
Expand Down

0 comments on commit 12c9710

Please sign in to comment.