From b3c8c8383099cc3bd42589e7feda778b25cb005c Mon Sep 17 00:00:00 2001 From: giquieu Date: Mon, 2 May 2022 04:44:04 -0300 Subject: [PATCH 1/2] fix: unable to send audio messages on Telegram (#4493) - Changed the lib used to record the audio (videojs-record). - Changed the audio recording format to .ogg, this will keep compatibility with sending to channels, Telegram, Whatsapp, Web Widget and API. - Changed the visualization of recording waves, it is now using bars, the same format used by applications (Whatsapp and Telegram) Fixes: #4115 --- .../assets/scss/widgets/_reply-box.scss | 10 + .../widgets/WootWriter/AudioRecorder.vue | 295 +++++++++--------- .../widgets/conversation/ReplyBox.vue | 32 +- .../FluentIcon/dashboard-icons.json | 6 +- app/models/channel/telegram.rb | 2 + config/webpack/environment.js | 9 + package.json | 5 +- 7 files changed, 184 insertions(+), 175 deletions(-) diff --git a/app/javascript/dashboard/assets/scss/widgets/_reply-box.scss b/app/javascript/dashboard/assets/scss/widgets/_reply-box.scss index 8a53545fe..1d2c3f63d 100644 --- a/app/javascript/dashboard/assets/scss/widgets/_reply-box.scss +++ b/app/javascript/dashboard/assets/scss/widgets/_reply-box.scss @@ -27,6 +27,16 @@ padding: 0 $space-small; } + .video-js { + background: transparent; + // Override min-height : 50px in foundation + // + max-height: $space-mega * 2.4; + min-height: 4.8rem; + padding: var(--space-normal) 0 0; + resize: none; + } + >textarea { @include ghost-input(); @include margin(0); diff --git a/app/javascript/dashboard/components/widgets/WootWriter/AudioRecorder.vue b/app/javascript/dashboard/components/widgets/WootWriter/AudioRecorder.vue index 4d6df7793..8796065ac 100644 --- a/app/javascript/dashboard/components/widgets/WootWriter/AudioRecorder.vue +++ b/app/javascript/dashboard/components/widgets/WootWriter/AudioRecorder.vue @@ -1,16 +1,29 @@