File tree Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ import {_tgico} from '../helpers/tgico';
4242import Icon from './icon' ;
4343import setCurrentTime from '../helpers/dom/setCurrentTime' ;
4444import makeError from '../helpers/makeError' ;
45+ import { hideToast , toastNew } from './toast' ;
46+ import anchorCallback from '../helpers/dom/anchorCallback' ;
47+ import PopupPremium from './popups/premium' ;
48+
4549
4650const UNMOUNT_PRELOADER = true ;
4751
@@ -209,6 +213,16 @@ async function wrapVoiceMessage(audioEl: AudioElement) {
209213 if ( message . pFlags . is_outgoing ) {
210214 return ;
211215 }
216+ if ( ! rootScope . getPremium ( ) ) {
217+ toastNew ( {
218+ langPackKey : 'AudioAndVideoTranscription.PremiumAlert' ,
219+ langPackArguments : [ anchorCallback ( ( ) => {
220+ hideToast ( ) ;
221+ PopupPremium . show ( { feature : 'voice_to_text' } ) ;
222+ } ) ]
223+ } ) ;
224+ return ;
225+ }
212226
213227 audioEl . transcriptionState = 1 ;
214228 ! speechRecognitionLoader . parentElement && speechRecognitionDiv . append ( speechRecognitionLoader ) ;
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ export function wrapRoundVideoBubble({
201201 async function showAudio ( ) {
202202 if ( ! rootScope . getPremium ( ) ) {
203203 toastNew ( {
204- langPackKey : 'RoundVideoTranscription .PremiumAlert' ,
204+ langPackKey : 'AudioAndVideoTranscription .PremiumAlert' ,
205205 langPackArguments : [ anchorCallback ( ( ) => {
206206 hideToast ( ) ;
207207 PopupPremium . show ( { feature : 'voice_to_text' } ) ;
Original file line number Diff line number Diff line change @@ -3462,7 +3462,7 @@ const lang = {
34623462 'EnableDarkMode' : 'Enable Dark Mode' ,
34633463 'DisableDarkMode' : 'Disable Dark Mode' ,
34643464 'DisableAnimations' : 'Disable Animations' ,
3465- 'RoundVideoTranscription .PremiumAlert' : 'Subscribe to Telegram Premium to unlock video and audio transcription. [Read More]()' ,
3465+ 'AudioAndVideoTranscription .PremiumAlert' : 'Subscribe to Telegram Premium to unlock video and audio transcription. [Read More]()' ,
34663466 'Chat.Search.JoinedChannels' : 'Channels you joined' ,
34673467 'Chat.Search.NothingFound' : 'Nothing interesting here yet...' ,
34683468 'UnknownBotUsers' : 'Unknown users' ,
Original file line number Diff line number Diff line change 29992999"EnableDarkMode" = "Enable Dark Mode";
30003000"DisableDarkMode" = "Disable Dark Mode";
30013001"DisableAnimations" = "Disable Animations";
3002- "RoundVideoTranscription .PremiumAlert" = "Subscribe to Telegram Premium to unlock video and audio transcription. [Read More]()";
3002+ "AudioAndVideoTranscription .PremiumAlert" = "Subscribe to Telegram Premium to unlock video and audio transcription. [Read More]()";
30033003"Chat.Search.JoinedChannels" = "Channels you joined";
30043004"Chat.Search.NothingFound" = "Nothing interesting here yet...";
30053005"UnknownBotUsers" = "Unknown users";
You can’t perform that action at this time.
0 commit comments