@onereach/step-voice 6.0.18 → 6.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dst/voice.js +13 -14
  2. package/package.json +1 -1
package/dst/voice.js CHANGED
@@ -171,20 +171,19 @@ class VoiceStep extends step_1.default {
171
171
  }
172
172
  async pauseRecording(call, command, sensitiveData) {
173
173
  const commands = [command];
174
- if (call.recordCall && sensitiveData?.muteStep) {
175
- if (call.vv >= 2) {
176
- // newer voicer version automaically should stop/resume session recording
177
- command.params.sensitiveData = sensitiveData;
178
- }
179
- else {
180
- commands.unshift({
181
- name: 'stop-record-session',
182
- params: {
183
- muteUser: sensitiveData.muteUser,
184
- muteBot: sensitiveData.muteBot
185
- }
186
- });
187
- }
174
+ const stopRecording = (call.recordCall && sensitiveData?.muteStep);
175
+ if (call.vv >= 2) {
176
+ // newer voicer version automaically should stop/resume session recording
177
+ command.params.sensitiveData = stopRecording ? sensitiveData : {};
178
+ }
179
+ else if (stopRecording) {
180
+ commands.unshift({
181
+ name: 'stop-record-session',
182
+ params: {
183
+ muteUser: sensitiveData.muteUser,
184
+ muteBot: sensitiveData.muteBot
185
+ }
186
+ });
188
187
  }
189
188
  await this.sendCommands(call, commands);
190
189
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "6.0.18",
3
+ "version": "6.0.19",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",