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

Fixed issue where BOM wasn't being stripped from transcripts opened v… #1425

Merged
merged 1 commit into from Apr 12, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [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)
- [ui-react] Added default disabled styling to checkbox control in PR [1424](https://github.com/Microsoft/BotFramework-Emulator/pull/1424)
- [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
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
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