From 6f871e3fb5584ed07462ff9a1880d54a3e873d00 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Sat, 23 Apr 2016 21:48:55 +0300 Subject: [PATCH] merged with master --- app.manifest | 2 +- css/app.css | 1 + js/app.js | 4 ++-- js/locales/de-de.json | 1 + js/locales/es-es.json | 3 ++- js/locales/it-it.json | 1 + js/locales/nl-nl.json | 1 + js/locales/pt-br.json | 1 + js/locales/ru-ru.json | 1 + webogram.appcache | 2 +- 10 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app.manifest b/app.manifest index 23735af5..4fc9c7e3 100644 --- a/app.manifest +++ b/app.manifest @@ -1,5 +1,5 @@ CACHE MANIFEST -# Time: Fri Apr 22 2016 20:22:57 GMT+0300 (MSK) +# Time: Sat Apr 23 2016 21:47:57 GMT+0300 (MSK) CACHE: diff --git a/css/app.css b/css/app.css index feed97d0..615e5238 100644 --- a/css/app.css +++ b/css/app.css @@ -1955,6 +1955,7 @@ a.peer_modal_photo,div.peer_modal_photo{display:block;margin-right:19px} .md_modal_section_param_wrap{margin-top:19px;margin-bottom:19px} .md_modal_section_param_wrap:last-child{margin-bottom:16px} .md_modal_section_param_wrap .md_modal_section_param_name{color:#909090;font-size:11px;line-height:14px;margin-top:4px} +.md_modal_section_param_wrap .md_modal_section_param_value{word-break:break-all;word-wrap:break-word;overflow:hidden} .md_modal_section_range_wrap{padding-right:4px;margin-bottom:25px;padding-top:1px} .md_modal_section_select_wrap{margin-bottom:20px} .md_modal_section_select{float:right;font-size:12px;padding:0} diff --git a/js/app.js b/js/app.js index 3a2518c4..f62e0a15 100644 --- a/js/app.js +++ b/js/app.js @@ -38,12 +38,12 @@ var y,b;if(e.pts){var w=c.pts+(e.pts_count||0);if(wa?-a:0;c.startBot(e.user.id,i).then(function(){n.$broadcast("history_focus",{peerString:t})})})},e.sendCommand=function(t){c.sendText(e.userID,"/"+t),n.$broadcast("history_focus",{peerString:m})},e.toggleBlock=function(t){s.invokeApi(t?"contacts.block":"contacts.unblock",{id:o.getUserInput(e.userID)}).then(function(){e.blocked=t})},e.shareContact=function(){u.selectPeer({confirm_type:"SHARE_CONTACT_PEER",canSend:!0}).then(function(t){var a=d.getPeerID(t);c.sendOther(a,{_:"inputMediaContact",phone_number:e.user.phone,first_name:e.user.first_name,last_name:e.user.last_name,user_id:e.user.id}),n.$broadcast("history_focus",{peerString:t})})}}]).controller("ChatModalController",["$scope","$timeout","$rootScope","$modal","AppUsersManager","AppChatsManager","AppProfileManager","AppPhotosManager","MtpApiManager","MtpApiFileManager","NotificationsManager","AppMessagesManager","AppPeersManager","ApiUpdatesManager","ContactsSelectService","ErrorService",function(e,t,n,a,i,o,s,r,l,c,d,u,p,m,g,h){function f(t){m.processUpdateMessage(t),n.$broadcast("history_focus",{peerString:e.chatFull.peerString})}function _(t){t&&t.type&&0===t.type.indexOf("image")&&(e.photo.updating=!0,c.uploadFile(t).then(function(t){return l.invokeApi("messages.editChatPhoto",{chat_id:o.getChatInput(e.chatID),photo:{_:"inputChatUploadedPhoto",file:t,crop:{_:"inputPhotoCropAuto"}}}).then(f)})["finally"](function(){e.photo.updating=!1}))}e.chatFull=o.wrapForFull(e.chatID,{}),e.settings={notifications:!0},e.maxParticipants=200,s.getChatFull(e.chatID).then(function(t){e.chatFull=o.wrapForFull(e.chatID,t),e.$broadcast("ui_height"),e.canMigrate=e.chatFull&&e.chatFull.participants&&e.chatFull.participants.participants&&e.chatFull.participants.participants.length>=200,(Config.Modes.test||Config.Modes.debug)&&(e.canMigrate=!0),d.savePeerSettings(-e.chatID,t.notify_settings),d.getPeerMuted(-e.chatID).then(function(t){e.settings.notifications=!t,e.$watch("settings.notifications",function(t,n){return t===n?!1:void d.getPeerSettings(-e.chatID).then(function(n){n.mute_until=t?0:2e9,d.updatePeerSettings(-e.chatID,n)})})})}),e.leaveGroup=function(){l.invokeApi("messages.deleteChatUser",{chat_id:o.getChatInput(e.chatID),user_id:{_:"inputUserSelf"}}).then(f)},e.returnToGroup=function(){l.invokeApi("messages.addChatUser",{chat_id:o.getChatInput(e.chatID),user_id:{_:"inputUserSelf"}}).then(f)},e.inviteToGroup=function(){var t=[];angular.forEach(e.chatFull.participants.participants,function(e){t.push(e.user_id)}),g.selectContacts({disabled:t}).then(function(t){angular.forEach(t,function(t){l.invokeApi("messages.addChatUser",{chat_id:o.getChatInput(e.chatID),user_id:i.getUserInput(t),fwd_limit:100}).then(function(e){m.processUpdateMessage(e)})}),n.$broadcast("history_focus",{peerString:e.chatFull.peerString})})},e.migrateToSuperGroup=function(){h.confirm({type:"SUPERGROUP_MIGRATE"}).then(function(){l.invokeApi("messages.migrateChat",{chat_id:o.getChatInput(e.chatID)}).then(f)})},e.kickFromGroup=function(t){l.invokeApi("messages.deleteChatUser",{chat_id:o.getChatInput(e.chatID),user_id:i.getUserInput(t)}).then(f)},e.flushHistory=function(){h.confirm({type:"HISTORY_FLUSH"}).then(function(){u.flushHistory(-e.chatID).then(function(){n.$broadcast("history_focus",{peerString:e.chatFull.peerString})})})},e.inviteViaLink=function(){var t=n.$new();t.chatID=e.chatID,a.open({templateUrl:templateUrl("chat_invite_link_modal"),controller:"ChatInviteLinkModalController",scope:t,windowClass:"md_simple_modal_window"})},e.photo={},e.$watch("photo.file",_),e.deletePhoto=function(){e.photo.updating=!0,l.invokeApi("messages.editChatPhoto",{chat_id:o.getChatInput(e.chatID),photo:{_:"inputChatPhotoEmpty"}}).then(f)["finally"](function(){e.photo.updating=!1})},e.editTitle=function(){var t=n.$new();t.chatID=e.chatID,a.open({templateUrl:templateUrl("chat_edit_modal"),controller:"ChatEditModalController",scope:t,windowClass:"md_simple_modal_window mobile_modal"})},e.hasRights=function(t){return o.hasRights(e.chatID,t)}}]).controller("ChannelModalController",["$scope","$timeout","$rootScope","$modal","AppUsersManager","AppChatsManager","AppProfileManager","AppPhotosManager","MtpApiManager","MtpApiFileManager","NotificationsManager","AppMessagesManager","AppPeersManager","ApiUpdatesManager","ContactsSelectService","ErrorService",function(e,t,n,a,i,o,s,r,l,c,d,u,p,m,g,h){function f(t){m.processUpdateMessage(t),n.$broadcast("history_focus",{peerString:e.chatFull.peerString})}function _(t){t&&t.type&&0===t.type.indexOf("image")&&(e.photo.updating=!0,c.uploadFile(t).then(function(t){return l.invokeApi("channels.editPhoto",{channel:o.getChannelInput(e.chatID),photo:{_:"inputChatUploadedPhoto",file:t,crop:{_:"inputPhotoCropAuto"}}}).then(f)})["finally"](function(){e.photo.updating=!1}))}e.chatFull=o.wrapForFull(e.chatID,{}),e.settings={notifications:!0},e.isMegagroup=o.isMegagroup(e.chatID),s.getChannelFull(e.chatID,!0).then(function(t){e.chatFull=o.wrapForFull(e.chatID,t),e.$broadcast("ui_height"),d.savePeerSettings(-e.chatID,t.notify_settings),d.getPeerMuted(-e.chatID).then(function(t){e.settings.notifications=!t,e.$watch("settings.notifications",function(t,n){return t===n?!1:void d.getPeerSettings(-e.chatID).then(function(n){n.mute_until=t?0:2e9,d.updatePeerSettings(-e.chatID,n)})})}),e.chatFull.chat&&e.chatFull.chat.pFlags.creator&&e.chatFull.exported_invite&&"chatInviteEmpty"==e.chatFull.exported_invite._&&s.getChatInviteLink(e.chatID,!0).then(function(t){e.chatFull.exported_invite={_:"chatInviteExported",link:t}})}),e.leaveChannel=function(){l.invokeApi("channels.leaveChannel",{channel:o.getChannelInput(e.chatID)}).then(f)},e.deleteChannel=function(){return h.confirm({type:e.isMegagroup?"MEGAGROUP_DELETE":"CHANNEL_DELETE"}).then(function(){l.invokeApi("channels.deleteChannel",{channel:o.getChannelInput(e.chatID)}).then(f)})},e.joinChannel=function(){l.invokeApi("channels.joinChannel",{channel:o.getChannelInput(e.chatID)}).then(f)},e.inviteToChannel=function(){var t=[];angular.forEach((e.chatFull.participants||{}).participants||[],function(e){t.push(e.user_id)}),g.selectContacts({disabled:t}).then(function(t){var n=[];angular.forEach(t,function(e){n.push(i.getUserInput(e))}),l.invokeApi("channels.inviteToChannel",{channel:o.getChannelInput(e.chatID),users:n}).then(f)})},e.kickFromChannel=function(t){l.invokeApi("channels.kickFromChannel",{channel:o.getChannelInput(e.chatID),user_id:i.getUserInput(t),kicked:!0}).then(f)},e.shareLink=function(t){var i=n.$new();return i.chatID=e.chatID,a.open({templateUrl:templateUrl("chat_invite_link_modal"),controller:"ChatInviteLinkModalController",scope:i,windowClass:"md_simple_modal_window"}),cancelEvent(t)},e.photo={},e.$watch("photo.file",_),e.deletePhoto=function(){e.photo.updating=!0,l.invokeApi("channels.editPhoto",{channel:o.getChannelInput(e.chatID),photo:{_:"inputChatPhotoEmpty"}}).then(f)["finally"](function(){e.photo.updating=!1})},e.editChannel=function(){var t=n.$new();t.chatID=e.chatID,a.open({templateUrl:templateUrl(e.isMegagroup?"megagroup_edit_modal":"channel_edit_modal"),controller:"ChannelEditModalController",scope:t,windowClass:"md_simple_modal_window mobile_modal"})},e.goToHistory=function(){n.$broadcast("history_focus",{peerString:e.chatFull.peerString})},e.hasRights=function(t){return o.hasRights(e.chatID,t)}}]).controller("SettingsModalController",["$rootScope","$scope","$timeout","$modal","AppUsersManager","AppChatsManager","AppPhotosManager","MtpApiManager","Storage","NotificationsManager","MtpApiFileManager","PasswordManager","ApiUpdatesManager","ChangelogNotifyService","LayoutSwitchService","AppRuntimeManager","ErrorService","_",function(e,t,n,a,i,o,s,r,l,c,d,u,p,m,g,h,f,_){function v(){n.cancel(b),b=!1,u.getState().then(function(e){t.password=e,"account.noPassword"==e._&&e.email_unconfirmed_pattern&&!w&&(b=n(v,5e3))})}function y(e){e&&e.type&&0===e.type.indexOf("image")&&(t.photo.updating=!0,d.uploadFile(e).then(function(e){r.invokeApi("photos.uploadProfilePhoto",{file:e,caption:"",geo_point:{_:"inputGeoPointEmpty"},crop:{_:"inputPhotoCropAuto"}}).then(function(e){i.saveApiUsers(e.users),r.getUserID().then(function(n){s.savePhoto(e.photo,{user_id:n}),p.processUpdateMessage({_:"updateShort",update:{_:"updateUserPhoto",user_id:n,date:tsNow(!0),photo:i.getUser(n).photo,previous:!0}}),t.photo={}})})})["finally"](function(){delete t.photo.updating}))}t.profile={},t.photo={},t.version=Config.App.version,r.getUserID().then(function(e){t.profile=i.getUser(e)}),r.invokeApi("users.getFullUser",{id:{_:"inputUserSelf"}}).then(function(e){i.saveApiUser(e.user),s.savePhoto(e.profile_photo,{user_id:e.user.id})}),t.notify={volume:.5},t.send={},t.$watch("photo.file",y),t.password={_:"account.noPassword"},v();var b=!1,w=!1;t.changePassword=function(n){if(n=n||{},"cancel_email"==n.action)return f.confirm({type:"PASSWORD_ABORT_SETUP"}).then(function(){u.updateSettings(t.password,{email:""}).then(v)});var i=e.$new();i.password=t.password,angular.extend(i,n);var o=a.open({scope:i,templateUrl:templateUrl("password_update_modal"),controller:"PasswordUpdateModalController",windowClass:"md_simple_modal_window mobile_modal"});o.result["finally"](v)},t.showSessions=function(){a.open({templateUrl:templateUrl("sessions_list_modal"),controller:"SessionsListModalController",windowClass:"md_simple_modal_window mobile_modal"})},t.$on("$destroy",function(){n.cancel(b),w=!0}),t.deletePhoto=function(){t.photo.updating=!0,r.invokeApi("photos.updateProfilePhoto",{id:{_:"inputPhotoEmpty"},crop:{_:"inputPhotoCropAuto"}}).then(function(e){r.getUserID().then(function(n){p.processUpdateMessage({_:"updateShort",update:{_:"updateUserPhoto",user_id:n,date:tsNow(!0),photo:e,previous:!0}}),t.photo={}})})["finally"](function(){delete t.photo.updating})},t.editProfile=function(){a.open({templateUrl:templateUrl("profile_edit_modal"),controller:"ProfileEditModalController",windowClass:"md_simple_modal_window mobile_modal"})},t.changeUsername=function(){a.open({templateUrl:templateUrl("username_edit_modal"),controller:"UsernameEditModalController",windowClass:"md_simple_modal_window mobile_modal"})},t.terminateSessions=function(){f.confirm({type:"TERMINATE_SESSIONS"}).then(function(){r.invokeApi("auth.resetAuthorizations",{})})},l.get("notify_nodesktop","send_ctrlenter","notify_volume","notify_novibrate","notify_nopreview").then(function(a){t.notify.desktop=!a[0],t.send.enter=a[1]?"":"1",t.notify.volume=a[2]!==!1?a[2]>0&&a[2]<=1?a[2]:0:.5,t.notify.canVibrate=c.getVibrateSupport(),t.notify.vibrate=!a[3],t.notify.preview=!a[4],t.notify.volumeOf4=function(){return 1+Math.ceil((t.notify.volume-.1)/.33)},t.toggleSound=function(){t.notify.volume=t.notify.volume?0:.5};var i;t.$watch("notify.volume",function(t,a){t!==a&&(l.set({notify_volume:t}),e.$broadcast("settings_changed"),c.clear(),i&&n.cancel(i),i=n(function(){c.testSound(t)},500))}),t.toggleDesktop=function(){t.notify.desktop=!t.notify.desktop,t.notify.desktop?l.remove("notify_nodesktop"):l.set({notify_nodesktop:!0}),e.$broadcast("settings_changed")},t.togglePreview=function(){t.notify.preview=!t.notify.preview,t.notify.preview?l.remove("notify_nopreview"):l.set({notify_nopreview:!0}),e.$broadcast("settings_changed")},t.toggleVibrate=function(){t.notify.vibrate=!t.notify.vibrate,t.notify.vibrate?l.remove("notify_novibrate"):l.set({notify_novibrate:!0}),e.$broadcast("settings_changed")},t.toggleCtrlEnter=function(n){t.send.enter=n,t.send.enter?l.remove("send_ctrlenter"):l.set({send_ctrlenter:!0}),e.$broadcast("settings_changed")}}),t.openChangelog=function(){m.showChangelog(!1)},t.logOut=function(){f.confirm({type:"LOGOUT"}).then(function(){r.logOut().then(function(){location.hash="/login",h.reload()})})},t.switchBackToDesktop=Config.Mobile&&!Config.Navigator.mobile,t.switchToDesktop=function(){g.switchLayout(!1)}}]).controller("ChangelogModalController",["$scope","$modal",function(e,t){if(e.currentVersion=Config.App.version,!e.lastVersion){var n=e.currentVersion.split(".");e.lastVersion=n[0]+"."+n[1]+"."+Math.max(0,n[2]-1)}e.changelogHidden=!1,e.changelogShown=!1,e.canShowVersion=function(t){if(e.changelogShown)return!0;var n=versionCompare(t,e.lastVersion)>=0;return n||(e.changelogHidden=!0),n},e.showAllVersions=function(){e.changelogShown=!0,e.changelogHidden=!1,e.$emit("ui_height"),e.$broadcast("ui_height")},e.changeUsername=function(){t.open({templateUrl:templateUrl("username_edit_modal"),controller:"UsernameEditModalController",windowClass:"md_simple_modal_window mobile_modal"})}}]).controller("ProfileEditModalController",["$scope","$modalInstance","AppUsersManager","MtpApiManager",function(e,t,n,a){e.profile={},e.error={},a.getUserID().then(function(t){e.profile=n.getUser(t)}),e.updateProfile=function(){e.profile.updating=!0,a.invokeApi("account.updateProfile",{first_name:e.profile.first_name||"",last_name:e.profile.last_name||""}).then(function(a){e.error={},n.saveApiUser(a),t.close()},function(n){switch(n.type){case"FIRSTNAME_INVALID":e.error={field:"first_name"},n.handled=!0;break;case"LASTNAME_INVALID":e.error={field:"last_name"},n.handled=!0;break;case"NAME_NOT_MODIFIED":n.handled=!0,t.close()}})["finally"](function(){delete e.profile.updating})}}]).controller("UsernameEditModalController",["$scope","$modalInstance","AppUsersManager","MtpApiManager",function(e,t,n,a){e.profile={},e.error={},a.getUserID().then(function(t){e.profile=angular.copy(n.getUser(t))}),e.updateUsername=function(){e.profile.updating=!0,a.invokeApi("account.updateUsername",{username:e.profile.username||""}).then(function(a){e.checked={},n.saveApiUser(a),t.close()},function(e){"USERNAME_NOT_MODIFIED"==e.type&&(e.handled=!0,t.close())})["finally"](function(){delete e.profile.updating})},e.$watch("profile.username",function(t){return t&&t.length?void a.invokeApi("account.checkUsername",{username:t||""}).then(function(n){e.profile.username==t&&(e.checked=n?{success:!0}:{error:!0})},function(n){if(e.profile.username==t)switch(n.type){case"USERNAME_INVALID":e.checked={error:!0},n.handled=!0}}):void(e.checked={})})}]).controller("SessionsListModalController",["$scope","$q","$timeout","_","MtpApiManager","ErrorService","$modalInstance",function(e,t,n,a,i,o,s){function r(){n.cancel(l),i.invokeApi("account.getAuthorizations").then(function(t){e.sessionsLoaded=!0,e.authorizations=t.authorizations;for(var a,i=0,o=e.authorizations.length;o>i;i++)a=e.authorizations[i],a.current=1==(1&a.flags);e.authorizations.sort(function(e,t){return e.current?-1:t.current?1:t.date_active-e.date_active}),c||(l=n(r,5e3))})}e.slice={limit:20,limitDelta:20};var l=!1,c=!1;e.terminateSession=function(e){o.confirm({type:"TERMINATE_SESSION"}).then(function(){i.invokeApi("account.resetAuthorization",{hash:e}).then(r)})},e.terminateAllSessions=function(){o.confirm({type:"TERMINATE_SESSIONS"}).then(function(){i.invokeApi("auth.resetAuthorizations",{})})},r(),e.$on("apiUpdate",function(e,t){"updateNewAuthorization"==t._&&r()}),e.$on("$destroy",function(){n.cancel(l),c=!0})}]).controller("PasswordUpdateModalController",["$scope","$q","_","PasswordManager","MtpApiManager","ErrorService","$modalInstance",function(e,t,n,a,i,o,s){switch(e.passwordSettings={},e.updatePassword=function(){delete e.passwordSettings.error_field;var i;if("disable"==e.action)i=t.when();else{if(!e.passwordSettings.new_password)return e.passwordSettings.error_field="new_password",e.$broadcast("new_password_focus"),!1;if(e.passwordSettings.new_password!=e.passwordSettings.confirm_password)return e.passwordSettings.error_field="confirm_password",e.$broadcast("confirm_password_focus"),!1;i=e.passwordSettings.email?t.when():o.confirm({type:"RECOVERY_EMAIL_EMPTY"})}e.passwordSettings.loading=!0,i.then(function(){a.updateSettings(e.password,{cur_password:e.passwordSettings.cur_password||"",new_password:e.passwordSettings.new_password,email:e.passwordSettings.email,hint:e.passwordSettings.hint}).then(function(t){delete e.passwordSettings.loading,s.close(!0),"disable"==e.action?o.alert(n("error_modal_password_disabled_title_raw"),n("error_modal_password_disabled_descripion_raw")):o.alert(n("error_modal_password_success_title_raw"),n("error_modal_password_success_descripion_raw"))},function(t){switch(t.type){case"PASSWORD_HASH_INVALID":case"NEW_PASSWORD_BAD":e.passwordSettings.error_field="cur_password",t.handled=!0,e.$broadcast("cur_password_focus");break;case"NEW_PASSWORD_BAD":e.passwordSettings.error_field="new_password",t.handled=!0;break;case"EMAIL_INVALID":e.passwordSettings.error_field="email",t.handled=!0;break;case"EMAIL_UNCONFIRMED":o.alert(n("error_modal_email_unconfirmed_title_raw"),n("error_modal_email_unconfirmed_descripion_raw")),s.close(!0),t.handled=!0}delete e.passwordSettings.loading})})},e.action){case"disable":e.passwordSettings.new_password="";break;case"create":onContentLoaded(function(){e.$broadcast("new_password_focus")})}e.$watch("passwordSettings.new_password",function(t){var n=t&&t.length||0;e.passwordSettings.hint=n?3>=n?"***":t.charAt(0)+new Array(n-1).join("*")+t.charAt(n-1):"",e.$broadcast("value_updated")})}]).controller("PasswordRecoveryModalController",["$scope","$q","_","PasswordManager","MtpApiManager","ErrorService","$modalInstance",function(e,t,n,a,i,o,s){e.checkCode=function(){e.recovery.updating=!0,a.recover(e.recovery.code,e.options).then(function(e){o.alert(n("error_modal_password_disabled_title_raw"),n("error_modal_password_disabled_descripion_raw")),s.close(e)},function(t){switch(delete e.recovery.updating,t.type){case"CODE_EMPTY":case"CODE_INVALID":e.recovery.error_field="code",t.handled=!0;break;case"PASSWORD_EMPTY":case"PASSWORD_RECOVERY_NA":case"PASSWORD_RECOVERY_EXPIRED":s.dismiss(),t.handled=!0}})}}]).controller("ContactsModalController",["$scope","$timeout","$modal","$modalInstance","MtpApiManager","AppUsersManager","ErrorService",function(e,t,n,a,i,o,s){function r(){e.selectedContacts={},e.selectedCount=0}function l(n){var a=++c,s=[];o.getContacts(n).then(function(t){a==c&&(e.contacts=[],e.slice.limit=20,angular.forEach(t,function(t){var n={userID:t,user:o.getUser(t)};s.push(t),e.contacts.push(n)}),e.contactsEmpty=n?!1:!e.contacts.length,e.$broadcast("contacts_change"))}),n&&n.length>=5&&t(function(){a==c&&i.invokeApi("contacts.search",{q:n,limit:10}).then(function(t){o.saveApiUsers(t.users),a==c&&angular.forEach(t.results,function(t){var n=t.user_id;-1==s.indexOf(n)&&e.contacts.push({userID:n,user:o.getUser(n),peerString:o.getUserString(n),found:!0})})},function(e){400==e.code&&(e.handled=!0)})},500)}e.contacts=[],e.foundPeers=[],e.search={},e.slice={limit:20,limitDelta:20};var c=0;if(r(),e.disabledContacts={},e.disabled)for(var d=0;d0){var t=[];return angular.forEach(e.selectedContacts,function(e,n){t.push(n)}),a.close(t)}},e.deleteSelected=function(){if(e.selectedCount>0){var t=[];angular.forEach(e.selectedContacts,function(e,n){t.push(n)}),o.deleteContacts(t).then(function(){e.toggleEdit(!1)})}},e.importContact=function(){o.openImportContact()}}]).controller("PeerSelectController",["$scope","$modalInstance","$q","AppPeersManager","ErrorService",function(e,t,n,a,i){e.selectedPeers={},e.selectedPeerIDs=[],e.selectedCount=0,e.dialogSelect=function(o){if(!e.multiSelect){var s;if(e.confirm_type){var r=a.getPeerID(o),l=a.getPeer(r);s=i.confirm({type:e.confirm_type,peer_id:r,peer_data:l})}else s=n.when();return void s.then(function(){t.close(o)})}var r=a.getPeerID(o);if(e.selectedPeers[r]){delete e.selectedPeers[r],e.selectedCount--;var c=e.selectedPeerIDs.indexOf(r);c>=0&&e.selectedPeerIDs.splice(c,1)}else e.selectedPeers[r]=a.getPeer(r),e.selectedCount++,e.selectedPeerIDs.unshift(r)},e.submitSelected=function(){if(e.selectedCount>0){var n=[];return angular.forEach(e.selectedPeers,function(e,t){n.push(a.getPeerString(t))}),t.close(n)}},e.toggleSearch=function(){e.$broadcast("dialogs_search_toggle")}}]).controller("ChatCreateModalController",["$scope","$modalInstance","$rootScope","MtpApiManager","AppUsersManager","AppChatsManager","ApiUpdatesManager",function(e,t,n,a,i,o,s){e.group={name:""},e.createGroup=function(){if(e.group.name){e.group.creating=!0;var r=[];return angular.forEach(e.userIDs,function(e){r.push(i.getUserInput(e))}),a.invokeApi("messages.createChat",{title:e.group.name,users:r}).then(function(e){if(s.processUpdateMessage(e),e.updates&&e.updates.length){for(var a,i=0,r=e.updates.length;r>i;i++)if(a=e.updates[i],"updateNewMessage"==a._){n.$broadcast("history_focus",{peerString:o.getChatString(a.message.to_id.chat_id)});break}t.close()}})["finally"](function(){delete e.group.creating})}}}]).controller("ChatEditModalController",["$scope","$modalInstance","$rootScope","MtpApiManager","AppUsersManager","AppChatsManager","ApiUpdatesManager",function(e,t,n,a,i,o,s){var r=o.getChat(e.chatID);e.group={name:r.title},e.updateGroup=function(){if(e.group.name){if(e.group.name==r.title)return t.close();e.group.updating=!0;var i;return i=o.isChannel(e.chatID)?a.invokeApi("channels.editTitle",{channel:o.getChannelInput(e.chatID),title:e.group.name}):a.invokeApi("messages.editChatTitle",{chat_id:o.getChatInput(e.chatID),title:e.group.name}),i.then(function(t){s.processUpdateMessage(t);var a=o.getChatString(e.chatID);n.$broadcast("history_focus",{peerString:a})})["finally"](function(){delete e.group.updating})}}}]).controller("ChannelEditModalController",["$q","$scope","$modalInstance","$rootScope","MtpApiManager","AppUsersManager","AppChatsManager","AppProfileManager","ApiUpdatesManager",function(e,t,n,a,i,o,s,r,l){function c(){return i.invokeApi("channels.editTitle",{channel:s.getChannelInput(t.chatID),title:t.channel.title}).then(function(e){l.processUpdateMessage(e)})}function d(){return i.invokeApi("channels.editAbout",{channel:s.getChannelInput(t.chatID),about:t.channel.about})}var u=s.getChat(t.chatID),p={title:u.title};t.channel={title:u.title},r.getChannelFull(t.chatID).then(function(e){p.about=e.about,t.channel.about=e.about}),t.updateChannel=function(){if(t.channel.title.length){var n=[];return t.channel.title!=p.title&&n.push(c()),t.channel.about!=p.about&&n.push(d()),t.channel.updating=!0,e.all(n).then(function(){var e=s.getChatString(t.chatID);a.$broadcast("history_focus",{peerString:e})})["finally"](function(){delete t.channel.updating})}}}]).controller("ChatInviteLinkModalController",["_","$scope","$timeout","$modalInstance","AppChatsManager","AppProfileManager","ErrorService",function(e,t,n,a,i,o,s){function r(){n(function(){t.$broadcast("ui_invite_select")},100)}function l(e){var n=i.getChat(t.chatID);return n.username?(t.exportedInvite={link:"https://telegram.me/"+n.username,"short":!0},void r()):(e&&(t.exportedInvite.revoking=!0),void o.getChatInviteLink(t.chatID,e).then(function(e){t.exportedInvite={link:e,canRevoke:!0},r()})["finally"](function(){delete t.exportedInvite.revoking}))}t.exportedInvite={link:e("group_invite_link_loading_raw")};var c=i.isChannel(t.chatID),d=i.isMegagroup(t.chatID);t.revokeLink=function(){s.confirm({type:c&&!d?"REVOKE_CHANNEL_INVITE_LINK":"REVOKE_GROUP_INVITE_LINK"}).then(function(){l(!0)})},l()}]).controller("ImportContactModalController",["$scope","$modalInstance","$rootScope","AppUsersManager","ErrorService","PhonebookContactsService",function(e,t,n,a,i,o){void 0===e.importContact&&(e.importContact={}),e.phonebookAvailable=o.isAvailable(),e.doImport=function(){e.importContact&&e.importContact.phone&&(e.progress={enabled:!0},a.importContact(e.importContact.phone,e.importContact.first_name||"",e.importContact.last_name||"").then(function(e){e||i.show({error:{code:404,type:"USER_NOT_USING_TELEGRAM"}}),t.close(e)})["finally"](function(){delete e.progress.enabled}))},e.importPhonebook=function(){o.openPhonebookImport().result.then(function(e){e?t.close(e[0]):t.dismiss()})}}]).controller("CountrySelectModalController",["$scope","$modalInstance","$rootScope","_",function(e,t,n,a){e.search={},e.slice={limit:20,limitDelta:20};for(var i=SearchIndexManager.createIndex(),o=0;o5184e5?o=n?"mediumDate":"shortDate":i>432e5&&(o=n?"EEEE":"EEE"),t(a,o)}}]).filter("time",["$filter",function(e){var t={},n=e("date"),a=Config.Mobile?"shortTime":"mediumTime";return function(e){return t[e]?t[e]:t[e]=n(1e3*e,a)}}]).filter("myDate",["$filter",function(e){var t={},n=e("date");return function(e){return t[e]?t[e]:t[e]=n(1e3*e,"fullDate")}}]).filter("duration",[function(){ return function(e){e=parseInt(e),isNaN(e)&&(e=0);var t=e%60,n=Math.floor((e-t)/60);return 10>t&&(t="0"+t),n+":"+t}}]).filter("durationRemains",["$filter",function(e){var t=e("duration");return function(e,n){return"-"+t(n-e)}}]).filter("phoneNumber",[function(){return function(e){var t=" ";return e=(e||"").replace(/\D/g,""),"7"==e.charAt(0)&&11==e.length?"+"+e.charAt(0)+t+"("+e.substr(1,3)+")"+t+e.substr(4,3)+"-"+e.substr(7,2)+"-"+e.substr(9,2):"+"+e}}]).filter("formatSize",[function(){return function(e,t){if(!e)return"0";if(1024>e)return e+" b";if(1048576>e)return Math.round(e/1024)+" KB";var n=e/1048576;return n=t?n.toFixed(1):Math.round(10*n)/10,n+" MB"}}]).filter("formatSizeProgress",["$filter","_",function(e,t){var n=e("formatSize");return function(e){if(!e.total)return"";var a=n(e.done,!0),i=a.split(" "),o=n(e.total),s=o.split(" ");return s[1]===i[1]?t("format_size_progress_mulitple",{done:i[0],total:s[0],parts:i[1]||""}):t("format_size_progress",{done:a,total:o})}}]).filter("formatShortNumber",[function(){return function(e){if(!e)return"0";if(1e3>e)return e.toString();if(9e5>e){var t=e>1e4?1:10;return Math.round(e/1e3*t)/t+"K"}var t=e>1e7?1:10;return Math.round(e/1e6*t)/t+"M"}}]).filter("nl2br",[function(){return function(e){return e.replace(/\n/g,"
")}}]).filter("richText",["$filter",function(e){var t=e("linky");return function(e){return t(e,"_blank").replace(/\n| /g,"
")}}]).filter("relativeTime",["$filter","_",function(e,t){var n=t.pluralize("relative_time_pluralize_minutes_ago"),a=t.pluralize("relative_time_pluralize_hours_ago"),i=e("dateOrTime");return function(e){var o=Math.abs(tsNow(!0)-e);if(60>o)return t("relative_time_just_now");if(3600>o){var s=Math.floor(o/60);return n(s)}if(86400>o){var r=Math.floor(o/3600);return a(r)}return i(e,!0)}}]),angular.module("myApp.services").service("AppMessagesManager",["$q","$rootScope","$location","$filter","$timeout","$sce","ApiUpdatesManager","AppUsersManager","AppChatsManager","AppPeersManager","AppPhotosManager","AppDocsManager","AppStickersManager","AppWebPagesManager","MtpApiManager","MtpApiFileManager","RichTextProcessor","NotificationsManager","Storage","AppProfileManager","TelegramMeWebService","ErrorService","StatusManager","_",function(e,t,n,a,i,o,s,r,l,c,d,u,p,m,g,h,f,_,v,y,b,w,k,$){function C(t,n,a){var i=Ce,o=angular.isString(t)&&t.length;if(o){if(!a||Te.query!==t){Te.query=t;var s=SearchIndexManager.search(t,Ee);Te.dialogs=[],angular.forEach(Ce.dialogs,function(e){s[e.peerID]&&Te.dialogs.push(e)}),Te.count=Te.dialogs.length}i=Te}else Te.query=!1;var r=0;if(n>0)for(r=0;ri.dialogs[r].index);r++);return a=a||20,o||We||i.dialogs.length>=r+a?e.when({dialogs:i.dialogs.slice(r,r+a)}):x(a).then(function(){if(r=0,n>0)for(r=0;ri.dialogs[r].index);r++);return{dialogs:i.dialogs.slice(r,r+a)}})}function S(e){for(var t=0;tu)&&(u=p.date),t.index=I(u),t.peerID=n,A(t,d),r.mid&&r.mid>t.read_inbox_max_id&&(r.pFlags.unread=!0),void 0===$e[n]){var m={count:null,history:[o],pending:[]};$e[n]=m}_.savePeerSettings(n,t.notify_settings),t.pts&&s.addChannelState(e,t.pts)}function x(e){var n=Ce.dialogs,a=0,i=0,o=0;return Ge&&(a=Ge+Be),g.invokeApi("messages.getDialogs",{offset_date:a,offset_id:P(i),offset_peer:c.getInputPeerByID(o),limit:e},{timeout:300}).then(function(e){a||b.setAuthorized(!0),r.saveApiUsers(e.users),l.saveApiChats(e.chats),Y(e.messages);var i=a?!0:!1;angular.forEach(e.dialogs,function(e){var n=c.getPeerID(e.peer);if("dialogChannel"==e._){var a=-n;M(a,e),s.addChannelState(a,e.pts)}else{if(0>n){var o=l.getChat(-n);if(o&&o.migrated_to&&o.pFlags.deactivated){var r=c.getPeerID(o.migrated_to);return Ye[n]=r,void(Ze[r]=n)}}var d=c.getPeerSearchText(n);SearchIndexManager.indexObject(n,d,Ee);var u=H(e.top_message);if(e.index=I(u.date),e.peerID=n,A(e,u.date),i||(me(e.top_message),i=!0),void 0===$e[n]){var p={count:null,history:[e.top_message],pending:[]};$e[n]=p,j(p,u)&&t.$broadcast("history_reply_markup",{peerID:n})}if(_.savePeerSettings(n,e.notify_settings),e.unread_count>0&&He&&e.top_message>He){var m=16&u.flags?u.from_id:n;!u.pFlags.unread||u.pFlags.out||u.pFlags.silent||_.getPeerMuted(m).then(function(e){e||ge(u)})}}}),(!e.dialogs.length||!e.count||n.length>=e.count)&&(We=!0)})}function I(e){return void 0===e&&(e=tsNow(!0)+Be),65536*e+(65535&++Ke)}function A(e,t){t&&(!Ge||Ge>t)&&(Ge=t);var n=Ce.dialogs,a=S(e.peerID)[1];void 0!==a&&n.splice(a,1);var i,o=e.index,s=n.length;if(!s||o=n[0].index)n.unshift(e);else for(i=0;s>i;i++)if(o>n[i].index){n.splice(i,0,e);break}}function E(t,n,a,i){var o,d=c.isChannel(t),u=d&&c.isMegagroup(t);return o=d&&!u?g.invokeApi("channels.getImportantHistory",{channel:l.getChannelInput(-t),offset_id:n?P(n):0,add_offset:i||0,limit:a||0},{timeout:300,noErrorBox:!0}):g.invokeApi("messages.getHistory",{peer:c.getInputPeerByID(t),offset_id:n?P(n):0,add_offset:i||0,limit:a||0},{timeout:300,noErrorBox:!0}),o.then(function(e){return r.saveApiUsers(e.users),l.saveApiChats(e.chats),Y(e.messages),d&&s.addChannelState(-t,e.pts),0>t||!r.isBot(t)||e.messages.length==a&&a=e)return e;e=P(e);var n=Xe[t];return n||(n=++Qe*et,Je[n]=t,Xe[t]=n),n+e}function D(e){if(et>e)return[e,0];var t=e%et,n=Je[e-t];return[t,n]}function P(e){return e?e%et:0}function F(e){var t,n,a,i,o={},s={};for(t=0;t0)for(s=0;si.history[s]);s++);var r=i.history.length;i.history.splice(s,i.history.length-s),angular.forEach(o.messages,function(n){j(i,n)&&t.$broadcast("history_reply_markup",{peerID:e}),i.history.push(n.mid)});var l=i.history.length;a-=l-r;var c=Ye[e],d=Ze[e],u=void 0!==c||void 0!==d;if(u&&(i.count=Math.max(i.count,l)+1),a>0){if(n=i.history[l-1],u){if(!o.messages.length){if(!d)return i.count=l,!0;n=0,e=d}return R(e,n,a,i)}if(l=0;i--)if(o=be[n.history[i]],o&&!o.pFlags.out&&o.pFlags.unread){n.unreadOffset=i+1;break}}return e.when(n)}function U(e,n){if(!Ye[e]&&!Ze[n]&&l.hasChat(-n)){var a=l.getChat(-e);a&&a.migrated_to&&a.migrated_to.channel_id==-n&&(Ye[e]=n,Ze[n]=e,i(function(){var a=S(e);a.length&&(Ce.dialogs.splice(a[1],1),t.$broadcast("dialog_drop",{peerID:e})),t.$broadcast("dialog_migrate",{migrateFrom:e,migrateTo:n})},100))}}function O(e){return Ye[e]?Ye[e]:void 0}function B(e,t,n,a,i){Ye[e]&&(e=Ye[e]);var o=$e[e],s=0,r=!1,l=!1,c=!1;i=i?Math.min(50,i):0,void 0===o&&(o=$e[e]={count:null,history:[],pending:[]});var d=!1,u=e;if(Ze[e]&&(d=!0,t&&et>t&&(u=Ze[e])),!n&&!t){var p=S(e)[0];if(p&&p.unread_count>1){var m=p.unread_count;(c=m>50)?p.read_inbox_max_id?(t=p.read_inbox_max_id,a=16,l=16,n=4):(n=20,l=16,s=m-l):(n=Math.max(10,i,m+2),l=m)}else Config.Mobile&&(n=20)}if(t>0)for(r=!0,s=0;so.history[s]){r=!1;break}if(!r&&(null!==o.count&&o.history.length==o.count||o.history.length>=s+(n||1))){a?(a=Math.min(s,a),s=Math.max(0,s-a),n+=a):n=n||(s?20:i||5);var g=o.history.slice(s,s+n);return!t&&o.pending.length&&(g=o.pending.slice().concat(g)),N(e,{count:o.count,history:g,unreadOffset:l,unreadSkip:c})}return a||n||(n=i||20),r&&(s=0),a||c||t&&-1==o.history.indexOf(t)?(a&&(s=-a,n+=a),E(u,t,n,s).then(function(n){o.count=n.count||n.messages.length,d&&o.count++;var a=[];return angular.forEach(n.messages,function(e){a.push(e.mid)}),!t&&o.pending.length&&(a=o.pending.slice().concat(a)),N(e,{count:o.count,history:a,unreadOffset:l,unreadSkip:c})})):R(e,t,n,o).then(function(){if(s=0,t>0)for(s=0;so.history[s]);s++);var a=o.history.slice(s,s+n);return!t&&o.pending.length&&(a=o.pending.slice().concat(a)),N(e,{count:o.count,history:a,unreadOffset:l,unreadSkip:c})})}function L(e){return($e[e]||{}).reply_markup||!1}function j(e,t){if(!t.reply_markup&&!t.pFlags.out&&!t.action)return!1;if(t.reply_markup&&"replyInlineMarkup"==t.reply_markup._)return!1;var n=t.reply_markup,a=e.reply_markup;if(n)return a&&a.mid>=t.mid?!1:!n.pFlags.selective||16&t.flags?(e.maxOutID&&t.mida.mid||t.mid<0)&&t.message)return a.pFlags.hidden=!0,!0}else(!e.maxOutID||t.mid>e.maxOutID)&&(e.maxOutID=t.mid);return t.action&&"messageActionChatDeleteUser"==t.action._&&(a?t.action.user_id==a.fromID:r.isBot(t.action.user_id))?(e.reply_markup={_:"replyKeyboardHide",mid:t.mid,flags:0,pFlags:{}},!0):!1}function q(t,n,a,i,o){var s=[],d=!n,u={peer:t,filter:a},p=d&&angular.equals(De,u);if(d&&!p&&(De=u,Pe=[]),t&&!i&&!n){var m=$e[t];if(void 0!==m&&m.history.length){var h,f,_,v={},y=o||20;switch(a._){case"inputMessagesFilterPhotos":v.messageMediaPhoto=!0;break;case"inputMessagesFilterPhotoVideo":v.messageMediaPhoto=!0,v.messageMediaDocument=!0,h="video";break;case"inputMessagesFilterVideo":v.messageMediaDocument=!0,h="video";break;case"inputMessagesFilterDocument":v.messageMediaDocument=!0,h=!1;break;case"inputMessagesFilterVoice":v.messageMediaDocument=!0,h="voice"}for(f=0;f=y)break}}if(s.length=y));f++);}if(s.length||1e3==o)return d&&(Pe=listMergeSorted(Pe,s)),e.when({count:null,history:s});var w;if(t||!n){var k=0;c.isChannel(t)&&!c.isMegagroup(t)&&(k|=1),w=g.invokeApi("messages.search",{flags:k,peer:c.getInputPeerByID(t),q:n||"",filter:a||{_:"inputMessagesFilterEmpty"},min_date:0,max_date:0,limit:o||20,max_id:i||0},{timeout:300,noErrorBox:!0})}else{var $=0,C=0,S=0,M=i&&H(i);M&&M.date&&($=M.date+Be,S=M.id,C=ie(M)),w=g.invokeApi("messages.searchGlobal",{q:n,offset_date:$,offset_peer:c.getInputPeerByID(C),offset_id:P(S),limit:o||20},{timeout:300,noErrorBox:!0})}return w.then(function(e){r.saveApiUsers(e.users),l.saveApiChats(e.chats),Y(e.messages);var t=e.count||e.messages.length;return s=[],angular.forEach(e.messages,function(e){var t=ie(e);if(0>t){var n=l.getChat(-t);n.migrated_to&&U(t,-n.migrated_to.channel_id)}s.push(e.mid)}),d&&(Pe=listMergeSorted(Pe,s)),{count:t,history:s}},function(t){return 400==t.code&&(t.handled=!0),e.reject(t)})}function H(e){return be[e]||{deleted:!0}}function V(t){var n=F(t),a=[];return angular.forEach(n.msgIDs,function(e,t){var i;if(t>0){var o=l.getChat(t);if(!(o.pFlags.creator||o.pFlags.editor&&o.pFlags.megagroup)){var r=[];if((o.pFlags.editor||o.pFlags.megagroup)&&angular.forEach(e,function(e,a){var i=H(n.mids[t][a]);i.pFlags.out&&r.push(e)}),!r.length)return;e=r}i=g.invokeApi("channels.deleteMessages",{channel:l.getChannelInput(t),id:e}).then(function(n){s.processUpdateMessage({_:"updateShort",update:{_:"updateDeleteChannelMessages",channel_id:t,messages:e,pts:n.pts,pts_count:n.pts_count}})})}else i=g.invokeApi("messages.deleteMessages",{id:e}).then(function(t){s.processUpdateMessage({_:"updateShort",update:{_:"updateDeleteMessages",messages:e,pts:t.pts,pts_count:t.pts_count}})});a.push(i)}),e.all(a)}function z(e){var n=c.isChannel(e),a=$e[e],i=S(e)[0];if(!i||!i.unread_count){if(!a||!a.history.length)return!1;var o,r,d=!1;for(p=a.history.length;p>=0;p--)if(o=a.history[p],r=be[o],r&&!r.pFlags.out&&r.pFlags.unread){d=!0;break}if(!d)return!1}if(a.readPromise)return a.readPromise;var u;if(u=n?g.invokeApi("channels.readHistory",{channel:l.getChannelInput(-e),max_id:0}):g.invokeApi("messages.readHistory",{peer:c.getInputPeerByID(e),max_id:0}).then(function(e){s.processUpdateMessage({_:"updateShort",update:{_:"updatePts",pts:e.pts,pts_count:e.pts_count}})}),a.readPromise=u.then(function(){i&&(i.unread_count=0,t.$broadcast("dialog_unread",{peerID:e,count:0}),t.$broadcast("messages_read"),a&&a.history.length&&(i.read_inbox_max_id=a.history[0]))})["finally"](function(){delete a.readPromise}),a&&a.history.length){var o,r,p,e,i;for(p=0;pr.read_inbox_max_id:!0}e.reply_to_msg_id&&(e.reply_to_mid=T(e.reply_to_msg_id,i)),e.date-=Be;var p=e.fwd_from;p&&(e.fwdFromID=p.from_id?p.from_id:-p.channel_id,p.date-=Be),e.toID=n,e.fromID=e.from_id||n,e.via_bot_id>0&&(e.viaBotID=e.via_bot_id);var g={user_id:e.fromID,date:e.date};if(e.media)switch(e.media._){case"messageMediaEmpty":delete e.media;break;case"messageMediaPhoto":d.savePhoto(e.media.photo,g);break;case"messageMediaDocument":u.saveDoc(e.media.document,g);break;case"messageMediaWebPage":m.saveWebPage(e.media.webpage,e.mid,g)}if(e.action){var h,_;switch(e.action._){case"messageActionChatEditPhoto":d.savePhoto(e.action.photo,g),o&&(e.action._="messageActionChannelEditPhoto");break;case"messageActionChatEditTitle":o&&(e.action._="messageActionChannelEditTitle");break;case"messageActionChatDeletePhoto":o&&(e.action._="messageActionChannelDeletePhoto");break;case"messageActionChatAddUser":1==e.action.users.length?(e.action.user_id=e.action.users[0],e.fromID==e.action.user_id&&(e.action._=a?"messageActionChatJoined":"messageActionChatReturn")):e.action.users.length>1&&(e.action._="messageActionChatAddUsers");break;case"messageActionChatDeleteUser":e.fromID==e.action.user_id&&(e.action._="messageActionChatLeave");break;case"messageActionChannelMigrateFrom":h=-e.action.chat_id,_=-i;break;case"messageActionChatMigrateTo":h=-i,_=-e.action.channel_id}h&&_&&!Ye[h]&&!Ze[_]&&U(h,_)}if(e.message&&e.message.length){var v=f.parseEntities(e.message),y=e.entities||[];e.totalEntities=f.mergeEntities(v,y,!e.pending)}t||(be[s]=e)}})}function Z(e,n,a){if(angular.isString(n)&&n.length){a=a||{};var i,o=Ae--,l=[nextRandomInt(4294967295),nextRandomInt(4294967295)],d=bigint(l[0]).shiftLeft(32).add(bigint(l[1])).toString(),u=$e[e],p=0,m={},h=a.replyToMsgID,_=c.isChannel(e),v=_&&c.isMegagroup(e),y=_&&!v?!0:!1,b=a.entities||[];a.viaBotID||(n=f.parseMarkdown(n,b)),void 0===u&&(u=$e[e]={count:null,history:[],pending:[]});var w=r.getSelf().id;e!=w&&(p|=2,m.out=!0,_||r.isBot(e)||(p|=1,m.unread=!0)),h&&(p|=8),y?w=0:p|=256,i={_:"message",id:o,from_id:w,to_id:c.getOutputPeer(e),flags:p,pFlags:m,date:tsNow(!0)+Be,message:n,random_id:d,reply_to_msg_id:h,via_bot_id:a.viaBotID,reply_markup:a.reply_markup,entities:b,views:y&&1,pending:!0};var k=function(e){var n=we[o];e?(i.error=!0,n&&(n.error=!0)):(delete i.error,n&&delete n.error),t.$broadcast("messages_pending")};i.send=function(){k(!1);var t={};xe[e]&&(t.afterMessageID=xe[e].messageID);var o=0;h&&(o|=1),y&&(o|=16);var r;a.viaBotID?r=g.invokeApi("messages.sendInlineBotResult",{flags:o,peer:c.getInputPeerByID(e),random_id:l,reply_to_msg_id:P(h),query_id:a.queryID,id:a.resultID},t):(b.length&&(o|=8),r=g.invokeApi("messages.sendMessage",{flags:o,peer:c.getInputPeerByID(e),message:n,random_id:l,reply_to_msg_id:P(h),entities:b},t)),r.then(function(e){"updateShortSentMessage"==e._&&(i.flags=e.flags,i.date=e.date,i.id=e.id,i.media=e.media,i.entities=e.entities,e={_:"updates",users:[],chats:[],seq:0,updates:[{_:"updateMessageID",random_id:d,id:e.id},{_:_?"updateNewChannelMessage":"updateNewMessage",message:i,pts:e.pts,pts_count:e.pts_count}]}),s.processUpdateMessage(e)},function(e){k(!0)})["finally"](function(){xe[e]===t&&delete xe[e]}),xe[e]=t},Y([i]),u.pending.unshift(o),t.$broadcast("history_append",{peerID:e,messageID:o,my:!0}),setZeroTimeout(i.send),Se[d]=[e,o]}}function X(n,a,i){i=i||{};var o,l,d=Ae--,u=[nextRandomInt(4294967295),nextRandomInt(4294967295)],p=bigint(u[0]).shiftLeft(32).add(bigint(u[1])).toString(),m=$e[n],f=0,_={},v=i.replyToMsgID,y=c.isChannel(n),b=y&&c.isMegagroup(n),w=y&&!b?!0:!1;i.isMedia?["image/jpeg","image/png","image/bmp"].indexOf(a.type)>=0?(o="photo",l="photo."+a.type.split("/")[1]):"audio/"==a.type.substr(0,6)||["video/ogg"].indexOf(a.type)>=0?(o="audio",l="audio."+("ogg"==a.type.split("/")[1]?"ogg":"mp3")):"video/"==a.type.substr(0,6)?(o="video",l="video.mp4"):(o="document",l="document."+a.type.split("/")[1]):(o="document",l="document."+a.type.split("/")[1]),console.log(o,l,a.type),void 0===m&&(m=$e[n]={count:null,history:[],pending:[]});var k=r.getSelf().id;n!=k&&(f|=2,_.out=!0,y||r.isBot(n)||(f|=1,_.unread=!0)),v&&(f|=8),w?k=0:f|=256;var $,C={_:"messageMediaPending",type:o,file_name:a.name||l,size:a.size,progress:{percent:1,total:a.size}},S={_:"message",id:d,from_id:k,to_id:c.getOutputPeer(n),flags:f,pFlags:_,date:tsNow(!0)+Be,message:"",media:C,random_id:p,reply_to_msg_id:v,views:w&&1,pending:!0},M=function(e){var n=we[d];e?(S.error=!0,n&&(n.error=!0)):(delete S.error,n&&delete n.error),t.$broadcast("messages_pending")},x=!1;S.send=function(){var i=e.defer();Ie.then(function(){(!x||S.error)&&(x=!1,$=h.uploadFile(a)),$.then(function(e){e.name=l,x=!0;var t;switch(o){case"photo":t={_:"inputMediaUploadedPhoto",file:e};break;case"document":default:t={_:"inputMediaUploadedDocument",file:e,mime_type:a.type,caption:"",attributes:[{_:"documentAttributeFilename",file_name:a.name}]}}var i=0;v&&(i|=1),w&&(i|=16),g.invokeApi("messages.sendMedia",{flags:i,peer:c.getInputPeerByID(n),media:t,random_id:u,reply_to_msg_id:P(v)}).then(function(e){s.processUpdateMessage(e)},function(e){return"photo"!=o||400!=e.code||"PHOTO_INVALID_DIMENSIONS"!=e.type&&"PHOTO_SAVE_FILE_INVALID"!=e.type?void M(!0):(e.handled=!0,o="document",void S.send())})},function(e){M(!0)},function(e){C.progress.done=e.done,C.progress.percent=Math.max(1,Math.floor(100*e.done/e.total)),t.$broadcast("history_update",{peerID:n})}),C.progress.cancel=function(){x||(i.resolve(),$.cancel(),te(p))},$["finally"](function(){i.resolve()})}),Ie=i.promise},Y([S]),m.pending.unshift(d),t.$broadcast("history_append",{peerID:n,messageID:d,my:!0}),setZeroTimeout(S.send),Se[p]=[n,d]}function J(e,n,a){a=a||{};var i=Ae--,o=[nextRandomInt(4294967295),nextRandomInt(4294967295)],l=bigint(o[0]).shiftLeft(32).add(bigint(o[1])).toString(),m=$e[e],h=a.replyToMsgID,f=c.isChannel(e),_=f&&c.isMegagroup(e),v=f&&!_?!0:!1;void 0===m&&(m=$e[e]={count:null,history:[],pending:[]});var y,b=r.getSelf().id;switch(n._){case"inputMediaPhoto":y={_:"messageMediaPhoto",photo:d.getPhoto(n.id.id),caption:n.caption||""};break;case"inputMediaDocument":var w=u.getDoc(n.id.id);w.sticker&&w.stickerSetInput&&p.pushPopularSticker(w.id),y={_:"messageMediaDocument",document:w,caption:n.caption||""};break;case"inputMediaContact":y={_:"messageMediaContact",phone_number:n.phone_number,first_name:n.first_name,last_name:n.last_name,user_id:0};break;case"inputMediaGeoPoint":y={_:"messageMediaGeo",geo:{_:"geoPoint",lat:n.geo_point.lat,"long":n.geo_point["long"]}};break;case"inputMediaVenue":y={_:"messageMediaVenue",geo:{_:"geoPoint",lat:n.geo_point.lat,"long":n.geo_point["long"]},title:n.title,address:n.address,provider:n.provider,venue_id:n.venue_id};break;case"messageMediaPending":y=n}var k=0,$={};e!=b&&(k|=2,$.out=!0,r.isBot(e)||(k|=1,$.unread=!0)),h&&(k|=8),v?b=0:k|=256;var C={_:"message",id:i,from_id:b,to_id:c.getOutputPeer(e),flags:k,pFlags:$,date:tsNow(!0)+Be,message:"",media:y,random_id:l,reply_to_msg_id:h,via_bot_id:a.viaBotID,reply_markup:a.reply_markup,views:v&&1,pending:!0},S=function(e){var n=we[i];e?(C.error=!0,n&&(n.error=!0)):(delete C.error,n&&delete n.error),t.$broadcast("messages_pending")};C.send=function(){var t=0;h&&(t|=1),v&&(t|=16);var i={};xe[e]&&(i.afterMessageID=xe[e].messageID);var r;r=a.viaBotID?g.invokeApi("messages.sendInlineBotResult",{flags:t,peer:c.getInputPeerByID(e),random_id:o,reply_to_msg_id:P(h),query_id:a.queryID,id:a.resultID},i):g.invokeApi("messages.sendMedia",{flags:t,peer:c.getInputPeerByID(e),media:n,random_id:o,reply_to_msg_id:P(h)},i),r.then(function(e){s.processUpdateMessage(e)},function(e){S(!0)})["finally"](function(){xe[e]===i&&delete xe[e]}),xe[e]=i},Y([C]),m.pending.unshift(i),t.$broadcast("history_append",{peerID:e,messageID:i,my:!0}),setZeroTimeout(C.send),Se[l]=[e,i]}function Q(t,n){n=n.sort();var a=0,i=c.isChannel(t),o=i&&c.isMegagroup(t),r=i&&!o?!0:!1;r&&(a|=16);var l=F(n),d=[];return angular.forEach(l.msgIDs,function(e,n){for(var i=e.length,o=[],r=0;i>r;r++)o.push([nextRandomInt(4294967295),nextRandomInt(4294967295)]);var l={};xe[t]&&(l.afterMessageID=xe[t].messageID);var u=g.invokeApi("messages.forwardMessages",{flags:a,from_peer:c.getInputPeerByID(-n),id:e,random_id:o,to_peer:c.getInputPeerByID(t)},l).then(function(e){s.processUpdateMessage(e)})["finally"](function(){xe[t]===l&&delete xe[t]});xe[t]=l,d.push(u)}),e.all(d)}function ee(e,t,n){var a=t?-t:e;if(n){var i=bigint(nextRandomInt(4294967295)).shiftLeft(32).add(bigint(nextRandomInt(4294967295))).toString();return g.invokeApi("messages.startBot",{bot:r.getUserInput(e),peer:c.getInputPeerByID(a),random_id:i,start_param:n}).then(function(e){s.processUpdateMessage(e)})}return t?l.isChannel(t)?g.invokeApi("channels.inviteToChannel",{channel:l.getChannelInput(t),users:[r.getUserInput(e)]}).then(function(e){s.processUpdateMessage(e),Z(a,"/start@"+bot.username)},function(t){if(t&&"USER_ALREADY_PARTICIPANT"==t.type){var n=r.getUser(e);Z(a,"/start@"+n.username),t.handled=!0}}):g.invokeApi("messages.addChatUser",{chat_id:l.getChatInput(t),user_id:r.getUserInput(e)}).then(function(e){s.processUpdateMessage(e),Z(a,"/start@"+bot.username)},function(t){if(t&&"USER_ALREADY_PARTICIPANT"==t.type){var n=r.getUser(e);Z(a,"/start@"+n.username),t.handled=!0}}):Z(a,"/start")}function te(e){var t=Se[e];if(console.log("pending",e,t),t){var n=t[0],a=t[1],i=$e[n],o=i.pending.indexOf(a);return s.processUpdateMessage({_:"updateShort",update:{_:"updateDeleteMessages",messages:[a]}}),-1!=o&&i.pending.splice(o,1),delete we[a],delete be[a],!0}return!1}function ne(e,n){var a=Se[e];if(a){var i,o,s=a[0],r=a[1],l=$e[s],c=l.pending.indexOf(r);return-1!=c&&l.pending.splice(c,1),(i=be[r])&&(delete i.pending,delete i.error,delete i.random_id,delete i.send),(o=we[r])&&(we[n.mid]=angular.extend(o,re(n.mid)),delete o.pending,delete o.error,delete o.random_id,delete o.send,t.$broadcast("messages_pending")),delete we[r],delete be[r],i}return!1}function ae(e){return g.invokeApi("messages.checkChatInvite",{hash:e}).then(function(n){var a;if("chatInviteAlready"==n._){if(l.saveApiChat(n.chat),!n.chat.pFlags.left)return t.$broadcast("history_focus",{peerString:l.getChatString(n.chat.id)});a=n.chat.title}else a=n.title;w.confirm({type:n.pFlags.channel&&!n.pFlags.megagroup?"JOIN_CHANNEL_BY_LINK":"JOIN_GROUP_BY_LINK",title:a}).then(function(){return g.invokeApi("messages.importChatInvite",{hash:e}).then(function(e){if(s.processUpdateMessage(e),e.chats&&1==e.chats.length)t.$broadcast("history_focus",{peerString:l.getChatString(e.chats[0].id)});else if(e.updates&&e.updates.length)for(var n,a=0,i=e.updates.length;i>a;a++)if(n=e.updates[a],"updateNewMessage"==n._){t.$broadcast("history_focus",{peerString:l.getChatString(n.message.to_id.chat_id)});break}})})})}function ie(e){var t=e.to_id&&c.getPeerID(e.to_id)||0;return 0>t?t:e.pFlags&&e.pFlags.out||2&e.flags?t:e.from_id}function oe(e,t){var n=e&&void 0!==t,a=t&&t.unread_count;if(n&&void 0!==ke[e])return delete ke[e].typing,ke[e].unreadCount=a,ke[e];var i=angular.copy(be[e]);if(!i||!i.to_id){if(!t||!t.peerID)return i;i={_:"message",to_id:c.getOutputPeer(t.peerID),deleted:!0,date:tsNow(!0),pFlags:{}},i.deleted=!0}return i.peerID=ie(i),i.peerData=c.getPeer(i.peerID),i.peerString=c.getPeerString(i.peerID),i.unreadCount=a,"messageService"==i._&&i.action.user_id&&(i.action.user=r.getUser(i.action.user_id)),i.message&&i.message.length&&(i.richMessage=f.wrapRichText(i.message.substr(0,64),{noLinks:!0,noLinebreaks:!0})),i.dateText=Ve(i.date),n&&(ke[e]=i),i}function se(e){delete ke[e]}function re(e){if(void 0!==we[e])return we[e];var t=angular.copy(be[e])||{id:e};t.media&&void 0!==t.media.progress&&(t.media.progress=be[e].media.progress);var n=t.from_id&&r.getUser(t.from_id),a=n&&n.pFlags.bot&&n.username||!1,i=a||t.to_id&&(t.to_id.chat_id||t.to_id.user_id&&r.isBot(t.to_id.user_id));if(t.media)switch(t.media.caption&&t.media.caption.length&&(t.media.rCaption=f.wrapRichText(t.media.caption,{noCommands:!i,fromBot:a})),t.media._){case"messageMediaPhoto":t.media.photo=d.wrapForHistory(t.media.photo.id);break;case"messageMediaDocument":t.media.document=u.wrapForHistory(t.media.document.id);break;case"messageMediaGeo":var s="https://maps.google.com/?q="+t.media.geo.lat+","+t.media.geo["long"];t.media.mapUrl=o.trustAsResourceUrl(s);break;case"messageMediaVenue":var s;s="foursquare"==t.media.provider&&t.media.venue_id?"https://foursquare.com/v/"+encodeURIComponent(t.media.venue_id):"https://maps.google.com/?q="+t.media.geo.lat+","+t.media.geo["long"],t.media.mapUrl=o.trustAsResourceUrl(s);break;case"messageMediaContact":t.media.rFullName=f.wrapRichText(t.media.first_name+" "+(t.media.last_name||""),{noLinks:!0,noLinebreaks:!0});break;case"messageMediaWebPage":if(!t.media.webpage||"webPageEmpty"==t.media.webpage._){delete t.media;break}t.media.webpage=m.wrapForHistory(t.media.webpage.id)}else if(t.action)switch(t.action._){case"messageActionChatEditPhoto":case"messageActionChannelEditPhoto":t.action.photo=d.wrapForHistory(t.action.photo.id);break;case"messageActionChatCreate":case"messageActionChatEditTitle":case"messageActionChannelCreate":case"messageActionChannelEditTitle":t.action.rTitle=f.wrapRichText(t.action.title,{noLinebreaks:!0})||$("chat_title_deleted");break;case"messageActionBotIntro":t.action.rDescription=f.wrapRichText(t.action.description,{noCommands:!i,fromBot:a})}var l=t.reply_to_mid;return l&&(be[l]?t.reply_to_msg=oe(l):(t.reply_to_msg={mid:l,loading:!0},-1==Fe.indexOf(l)&&(Fe.push(l),Re===!1&&(Re=setTimeout(ce,100))))),we[e]=t}function le(e){if(!e||"replyKeyboardHide"==e._)return!1;if(e.wrapped)return e;var t="replyInlineMarkup"==e._,n=e.rows&&e.rows.length||0;return!(!t&&n>0&&4>=n)||e.pFlags&&e.pFlags.resize||(e.splitCount=n),e.wrapped=!0,angular.forEach(e.rows,function(e){angular.forEach(e.buttons,function(e){e.rText=f.wrapRichText(e.text,{noLinks:!0,noLinebreaks:!0}),"keyboardButtonUrl"==e._&&(e.pUrl=f.wrapUrl(e.url,!0))})}),e}function ce(){if(Re!==!1&&(clearTimeout(Re),Re=!1),Fe.length){var e=Fe.slice();Fe=[];var n=F(e);angular.forEach(n.msgIDs,function(e,a){var i;i=a>0?g.invokeApi("channels.getMessages",{channel:l.getChannelInput(a),id:e}):g.invokeApi("messages.getMessages",{id:e}),i.then(function(e){r.saveApiUsers(e.users),l.saveApiChats(e.chats),Y(e.messages),t.$broadcast("messages_downloaded",n.mids[a])})})}}function de(){if(Oe!==!1&&(clearTimeout(Oe),Oe=!1),Ue.length){var e=Ue.slice();Ue=[];var t=F(e);angular.forEach(t.msgIDs,function(e,n){g.invokeApi("messages.getMessagesViews",{peer:c.getInputPeerByID(-n),id:e,increment:!0}).then(function(e){if(n){for(var a=t.mids[n],i=[],o=0;o0?u=Math.min(t,d):0>t&&(c=Math.max(0,u+t)),n=c;u>n;n++){if(o=e[n],a=Math.floor((o.date+ye)/86400),l=s&&s.grouped,r=o.grouped,a===i?o.needDate&&(delete o.needDate,p=!0):(!n||s)&&(o.needDate||(o.needDate=!0,p=!0)),o.fwdFromID&&o.media&&o.media.document&&(o.media.document.sticker||o.media.document.audioTitle)&&(o.fromID!=(s||{}).fromID||!(s||{}).fwdFromID)&&(delete o.fwdFromID,o._="message"),o.views&&!Ne[o.mid]&&(Ne[o.mid]=!0,Ue.push(o.mid),Oe===!1&&(Oe=setTimeout(de,1e4))),s&&s.fromID==o.fromID&&!s.fwdFromID==!o.fwdFromID&&s.viaBotID==o.viaBotID&&!s.action&&!o.action&&o.dateHe&&v.set({max_seen_msg:e})}function ge(e,n){n=n||{};var a,i,o=ie(e),s={},c=!1,d=_.getNotifySettings();if(e.fwdFromID&&n.fwd_count)c=ze(n.fwd_count);else if(e.message)c=d.nopreview?$("conversation_message_sent"):f.wrapPlainText(e.message);else if(e.media)switch(e.media._){case"messageMediaPhoto":c=$("conversation_media_photo_raw");break;case"messageMediaDocument":switch(e.media.document.type){case"gif":c=$("conversation_media_gif_raw");break;case"sticker":c=$("conversation_media_sticker");var u=e.media.document.stickerEmojiRaw;void 0!==u&&(c=f.wrapPlainText(u)+" "+c);break;case"video":c=$("conversation_media_video_raw");break;case"voice":case"audio":c=$("conversation_media_audio_raw");break;default:c=e.media.document.file_name||$("conversation_media_document_raw")}break;case"messageMediaGeo":case"messageMediaVenue":c=$("conversation_media_location_raw");break;case"messageMediaContact":c=$("conversation_media_contact_raw");break;default:c=$("conversation_media_attachment_raw")}else if("messageService"==e._)switch(e.action._){case"messageActionChatCreate":c=$("conversation_group_created_raw"); -break;case"messageActionChatEditTitle":c=$("conversation_group_renamed_raw");break;case"messageActionChatEditPhoto":c=$("conversation_group_photo_updated_raw");break;case"messageActionChatDeletePhoto":c=$("conversation_group_photo_removed_raw");break;case"messageActionChatAddUser":case"messageActionChatAddUsers":c=$("conversation_invited_user_message_raw_raw");break;case"messageActionChatReturn":c=$("conversation_returned_to_group_raw");break;case"messageActionChatJoined":c=$("conversation_joined_group_raw");break;case"messageActionChatDeleteUser":c=$("conversation_kicked_user_message_raw");break;case"messageActionChatLeave":c=$("conversation_left_group_raw");break;case"messageActionChatJoinedByLink":c=$("conversation_joined_by_link_raw");break;case"messageActionChannelCreate":c=$("conversation_created_channel_raw");break;case"messageActionChannelEditTitle":c=$("conversation_changed_channel_name_raw");break;case"messageActionChannelEditPhoto":c=$("conversation_changed_channel_photo_raw");break;case"messageActionChannelDeletePhoto":c=$("conversation_removed_channel_photo_raw")}if(o>0){var p=r.getUser(e.from_id),m=r.getUserPhoto(e.from_id);s.title=(p.first_name||"")+(p.first_name&&p.last_name?" ":"")+(p.last_name||""),s.title||(s.title=p.phone||$("conversation_unknown_user_raw")),i=m,a=r.getUserString(o)}else{if(s.title=l.getChat(-o).title||$("conversation_unknown_chat_raw"),e.from_id>0){var p=r.getUser(e.from_id);s.title=(p.first_name||p.last_name||$("conversation_unknown_user_raw"))+" @ "+s.title}i=l.getChatPhoto(-o),a=l.getChatString(-o)}s.title=f.wrapPlainText(s.title),s.onclick=function(){t.$broadcast("history_focus",{peerString:a,messageID:16&e.flags?e.mid:0})},s.message=c,s.key="msg"+e.mid,s.tag=a,i.location&&!i.location.empty?h.downloadSmallFile(i.location,i.size).then(function(t){e.pFlags.unread&&(s.image=t,_.notify(s))}):_.notify(s)}function he(){i.cancel(tt),tt=!1,t.$broadcast("history_multiappend",nt),nt={}}function fe(){i.cancel(at),at=!1,angular.forEach(it,function(e){A(e)}),t.$broadcast("dialogs_multiupdate",it),it={}}function _e(){i.cancel(ot),ot=!1;var e=t.idle.isIDLE&&k.isOtherDeviceActive()?3e4:1e3;angular.forEach(st,function(t){t.isMutedPromise.then(function(n){var a=t.top_message;!n&&a.pFlags.unread&&setTimeout(function(){a.pFlags.unread&&ge(a,{fwd_count:t.fwd_count})},e)})}),st={}}function ve(n){var a=-n;return e.all([y.getChannelFull(n,!0),B(a,0)]).then(function(e){var i=e[0],o=e[1],s=o.history[0],r={_:"dialogChannel",peer:c.getOutputPeer(a),top_message:s,top_important_message:s,read_inbox_max_id:i.read_inbox_max_id,unread_count:i.unread_count,unread_important_count:i.unread_important_count,notify_settings:i.notify_settings};M(n,r);var l={};l[a]=r,t.$broadcast("dialogs_multiupdate",l)})}var ye,be={},we={},ke={},$e={},Ce={count:null,dialogs:[]},Se={},Me={},xe={},Ie=e.when(),Ae=-1,Ee=SearchIndexManager.createIndex(),Te={query:!1},De={},Pe=[],Fe=[],Re=!1,Ne={},Ue=[],Oe=!1,Be=0,Le=tsNow(!0),je=Le-Le%86400,qe=new Date;v.get("server_time_offset").then(function(e){e&&(Be=e)});var He=!1;Config.Modes.packed&&v.get("max_seen_msg").then(function(e){He=e||0});var Ve=a("dateOrTime"),ze=$.pluralize("conversation_forwarded_X_messages");qe.setHours(0),qe.setMinutes(0),qe.setSeconds(0),ye=je-Math.floor(+qe/1e3),_.start();var We=!1,Ge=0,Ke=0,Ye={},Ze={},Xe={},Je={},Qe=0,et=4294967296,tt=!1,nt={},at=!1,it={},ot=!1,st={};return t.$on("apiUpdate",function(e,n){switch(n._){case"updateMessageID":var a=n.random_id,o=Se[a];if(o){var s=o[0],d=c.isChannel(s)?-s:0;Me[T(n.id,d)]=a}break;case"updateNewMessage":case"updateNewChannelMessage":var u=n.message,s=ie(u),p=$e[s];if("updateNewChannelMessage"==n._){if(!l.isMegagroup(-s)&&!(u.pFlags.out||u.pFlags.mention||u.pFlags.post))break;var m=l.getChat(-s);if(m.pFlags&&(m.pFlags.left||m.pFlags.kicked))break}if(Y([u]),void 0!==p){var g=p.history;if(-1!=g.indexOf(u.mid))return!1;var h=g[0];g.unshift(u.mid),u.mid>0&&u.mid0&&E&&r.forceUserOnline(s),A=0;F>A;A++)if(x=g[A],!(x>D)&&(u=be[x],u.pFlags.out==E)){if(!u.pFlags.unread)break;u&&u.pFlags.unread&&(u.pFlags.unread=!1,we[x]&&(we[x].pFlags.unread=!1,R||(R=!0)),ke[x]&&(ke[x].pFlags.unread=!1),u.pFlags.out||(y&&(P=--y[0].unread_count),_.cancel("msg"+x)))}!E&&y&&(P&&y[0].top_message<=D&&(P=y[0].unread_count=0),y[0]||console.error("empty found dialog",y,n),y[0].read_inbox_max_id=D),P!==!1&&t.$broadcast("dialog_unread",{peerID:s,count:P}),R&&t.$broadcast("messages_read");break;case"updateReadMessagesContents":var A,x,u,N,U=n.messages,O=U.length;for(A=0;O>A;A++)x=U[A],(u=be[x])&&delete u.pFlags.media_unread,(N=we[x])&&delete N.pFlags.media_unread;break;case"updateDeleteMessages":case"updateDeleteChannelMessages":var x,u,A,s,y,g,B={},d=n.channel_id;for(A=0;A0&&(i.count-=e.count,i.count<0&&(i.count=0));for(var r=0;r0,z="channel"==L._&&(L.username||!L.pFlags.left&&!L.pFlags.kicked)&&!0||!1,W=void 0!==$e[s];z!=W&&(delete $e[s],t.$broadcast("history_forbidden",s)),V!=q&&(q?ve(d):y[0]&&(Ce.dialogs.splice(y[1],1),t.$broadcast("dialog_drop",{peerID:s})));break;case"updateChannelReload":var d=n.channel_id,s=-d,y=S(s);y[0]&&Ce.dialogs.splice(y[1],1),delete $e[s],ve(d).then(function(){t.$broadcast("history_reload",s)});break;case"updateChannelMessageViews":var G=n.views,$=T(n.id,n.channel_id),u=H($);u&&u.views&&u.views\n \n \n \n
\n
\n \n \n
\n [ \n \n \n \n \n \n \n \n \n ]\n \n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n'),e.put("partials/desktop/changelog_modal.html",'
\n\n
\n
\n
\n \n
\n
\n
\n\n
\n
\n \n
\n
\n
Telegram Web
\n
Version {{currentVersion}}
\n
\n
\n
\n\n
\n
\n \n \n \n
\n
\n\n
\n\n
\n\n
\n
0.5.4
\n
\n
    \n
  • Introducing Bot API 2.0, the biggest update to our bot platform since June 2015.
  • \n
  • New inline keyboards with callback, \'open URL\' or \'switch to inline mode\' buttons help create seamless interfaces.
  • \n
  • Bots can now update existing messages on the fly as you interact with them.
  • \n
  • Prepare for the rise of location-based bots: all bots can now ask users to share their location.
  • \n
  • Inline bots can now send all attachments supported in Telegram (videos, music, stickers, files, etc.).
  • \n
  • Try out these sample bots to see what\'s coming your way soon: @music, @sticker, @youtube, @foursquare
  • \n
  • Check out the Telegram Blog for more info.
  • \n
  • Improved quick forward in channels (Click on message date to try it out).
  • \n
  • Improved performance.
  • \n
\n\n
\n
\n\n
\n
0.5.3
\n
\n
    \n
  • Inline bots: A new way to add bot content to any chat. Type a bot\'s username and your query in the text field to get instant results and send them to your chat partner. Try typing @gif dog in your next chat. Sample bots: @gif, @wiki, @bing, @vid, @bold.
  • \n
  • Check out the Telegram Blog for more info.
  • \n
  • Improved GIFs: 20x faster sending and downloading, nice animated progress
  • \n
  • Click on message date to reply (or to forward from channels).
  • \n
  • Preview images before sending when pasting from clipboard.
  • \n
  • Improved formatting for copy-pasted history fragments (date, time and sender names inserted automatically).
  • \n
\n
\n
\n\n
\n
0.5.2
\n
\n
    \n
  • Unread counters for muted chats now colored in gray.
  • \n
  • Improved previews for sticker sets: Click on a sticker to view the whole set, click on stickers in a set to send right away, added a \'Share\' button.
  • \n
  • Improved performance.
  • \n
\n
\n
\n\n
\n
0.5.1
\n
\n
    \n
  • Groups that have reached their capacity of 200 users can be upgraded to supergroups of up to 1,000 members.
  • \n
  • Check out the Telegram Blog for more info
  • \n
\n
\n
\n\n
\n
0.5.0
\n
\n
    \n
  • Removed annoying "multiple tabs open" error.
  • \n
  • Improved message forwarding.
  • \n
  • Added view counter to messages from channels.
  • \n
  • Improved image loading in Safari and Firefox.
  • \n
\n
\n
\n\n
\n
0.4.9
\n
\n
    \n
  • New emoji and sticker menu, tabs for sticker packs.
  • \n
\n
\n
\n\n
\n
0.4.8
\n
\n
    \n
  • Introducing Channels – a great new way to broadcast your messages to unlimited audiences.
  • \n
  • Check out the Telegram Blog for more info
  • \n
  • Improved performance in Safari on OS X El Capitan.
  • \n
  • Added formatting for fixed-width code, surround text with `single backticks` for inline text and ```triple backticks``` for blocks of pre-formatted text.
  • \n
\n
\n
\n\n
\n
0.4.7
\n
\n
    \n
  • New bot API, free for everyone. If you\'re an engineer, create your own bots for games, services or integrations.\n
  • \n
  • Check out Telegram Blog for more info
  • \n
  • Improved Stickers support: now stickers are loading much faster.
  • \n
  • Click on any custom stickers in chats to view and add sticker sets.
  • \n
  • [Mobile] Reply to a message easily: tap on any message and select "Reply".
  • \n
\n
\n
\n\n
\n
0.4.6
\n
\n \n
\n
\n\n
\n
0.4.5
\n
\n
    \n
  • \n Invite links for group chats:
    \n Check out Telegram Blog for more info\n
  • \n
  • Smart notifications
  • \n
  • \'Listened\' status for voice messages
  • \n
  • Places in locations (venues, landmarks)
  • \n
\n
\n
\n\n
\n
0.4.4
\n
\n
    \n
  • Link Previews:
    \n Get rich link summaries for tweets, YouTube videos, Instagram photos and other content.
  • \n\n
  • Check out Telegram Blog for more info.
  • \n
\n
\n
\n\n
\n
0.4.3
\n
\n
    \n
  • Sessions List:
    \n View your active Telegram sessions (on desktop, tablet and mobile devices) and close specific sessions remotely.
  • \n\n
  • Two-step verification:
    \n Set up an additional password that will be required to log into your Telegram account.
  • \n\n
  • Check out Telegram Blog for more info.
  • \n
\n
\n
\n\n
\n
0.4.2
\n
\n
    \n
  • Optimization for screens with smaller Y-resolutions.
  • \n
  • Supported Spotify URL embeds.
  • \n
  • Mentions of the current user in group chats are now highlighted.
  • \n
\n
\n
\n\n
\n
0.4.1
\n
\n
    \n
  • Reply to specific messages in groups.
  • \n
  • Mention @usernames in groups to notify multiple users.
  • \n
  • Revised notifications in groups: mentioned users and people you reply to will be notified (private chat notification settings apply in this case instead of group settings). Check out Telegram Blog for more info.
  • \n
  • Setting to disable message preview
  • \n
\n
\n
\n\n
\n
0.4.0
\n
\n
    \n
  • Full stickers support
  • \n
  • Multisearch box: instantly find chats, usernames and messages
  • \n
  • Emoji autocomplete: e.g., type :kiss in the message field to see the list. Full cheat sheet »
  • \n
  • Added \'typing\' notification in chats list
  • \n
  • Online members counter in group headers
  • \n
\n
\n
\n\n
\n
0.3.9
\n
\n
    \n
  • [Desktop] Material design completed
  • \n
\n
\n
\n\n
\n
0.3.8
\n
\n
    \n
  • Telegram.me links open right in Telegram Web when authorized
  • \n
  • @username mentions in messages are clickable and open a conversation with the user
  • \n
\n
\n
\n\n
\n
0.3.7
\n
\n
    \n
  • [Desktop] New material design for modal windows
  • \n
  • [Desktop] Forward messages to multiple recipients
  • \n
\n
\n
\n\n
\n
0.3.6
\n
\n
    \n
  • New viewer for photos, videos, documents.
  • \n
  • [FirefoxOS] Improved media downloads.
  • \n
\n
\n
\n\n
\n
0.3.5
\n
\n
    \n
  • Added embedded Soundcloud tracks and playlists.
  • \n
  • Added global user search to contacts list.
  • \n
  • Added switch to mobile version on window resize.
  • \n
  • Migrate to HTTPS notification
  • \n
  • Bugfixes.
  • \n
\n
\n
\n\n
\n
0.3.4
\n
\n
    \n
  • Added embedded Facebook posts and Vimeo videos.
  • \n
  • Improved IE10+ support: downloading files and style fixes.
  • \n
  • Added unsupported media playback warning.
  • \n
  • Bugfixes.
  • \n
\n
\n
\n\n
\n
0.3.3
\n
\n
    \n
  • Added Native Client module: dramatically improved encryption speed; Download and upload speed is now as high as in native applications.
  • \n
  • HTTPS. We recommend you to use https://web.telegram.org.
  • \n
  • Added multiple open tabs warning. Please note, that only one tab with Telegram Web will work.
  • \n
  • Added embedded Instagram, Twitter, Vine, YouTube links.
  • \n
  • Jump to selected spot when playing back audio.
  • \n
  • Bugfixes
  • \n
\n
\n
\n\n
\n
0.3.2
\n
\n
    \n
  • Usernames support: Choose a username right now!
  • \n
  • Search can now find public users by username.
  • \n
  • Most popular emoticons shown in \'recent\' when empty
  • \n
  • [ChromeApp] Added saving window position and size
  • \n
  • Bugfixes
  • \n
\n
\n
\n\n
\n
0.3.1
\n
\n
    \n
  • New languages: Spanish, German and Italian are now available
  • \n
  • New custom-made audio player
  • \n
  • Bad browser page for IE 6-9
  • \n
  • Perfomance improvements and bugfixes
  • \n
\n
\n
\n\n
\n
0.3.0
\n
\n
    \n
  • Log in codes may be received in other Telegram apps
  • \n
  • Partner\'s online status updates automatically
  • \n
  • Added support for non-english hashtags in messages
  • \n
  • Fixed invalid scrollbar width bug
  • \n
  • [Desktop] Added automatic country code detection
  • \n
  • [FirefoxOS] Improved PUSH-notifications for <= 1.1
  • \n
  • [FirefoxOS] Fixed emoji in notifications
  • \n
  • [FirefoxOS] Fixed attachment bug for <= 1.1
  • \n
  • [FirefoxOS] Added phonebook permissions handling
  • \n
  • [FirefoxOS] Added ability to share Gallery photos in Telegram
  • \n
\n
\n
\n\n
\n\n\n \n\n
\n\n
'),e.put("partials/desktop/channel_edit_modal.html",'
\n\n
\n\n \n\n
\n\n \n\n
'), +break;case"messageActionChatEditTitle":c=$("conversation_group_renamed_raw");break;case"messageActionChatEditPhoto":c=$("conversation_group_photo_updated_raw");break;case"messageActionChatDeletePhoto":c=$("conversation_group_photo_removed_raw");break;case"messageActionChatAddUser":case"messageActionChatAddUsers":c=$("conversation_invited_user_message_raw_raw");break;case"messageActionChatReturn":c=$("conversation_returned_to_group_raw");break;case"messageActionChatJoined":c=$("conversation_joined_group_raw");break;case"messageActionChatDeleteUser":c=$("conversation_kicked_user_message_raw");break;case"messageActionChatLeave":c=$("conversation_left_group_raw");break;case"messageActionChatJoinedByLink":c=$("conversation_joined_by_link_raw");break;case"messageActionChannelCreate":c=$("conversation_created_channel_raw");break;case"messageActionChannelEditTitle":c=$("conversation_changed_channel_name_raw");break;case"messageActionChannelEditPhoto":c=$("conversation_changed_channel_photo_raw");break;case"messageActionChannelDeletePhoto":c=$("conversation_removed_channel_photo_raw")}if(o>0){var p=r.getUser(e.from_id),m=r.getUserPhoto(e.from_id);s.title=(p.first_name||"")+(p.first_name&&p.last_name?" ":"")+(p.last_name||""),s.title||(s.title=p.phone||$("conversation_unknown_user_raw")),i=m,a=r.getUserString(o)}else{if(s.title=l.getChat(-o).title||$("conversation_unknown_chat_raw"),e.from_id>0){var p=r.getUser(e.from_id);s.title=(p.first_name||p.last_name||$("conversation_unknown_user_raw"))+" @ "+s.title}i=l.getChatPhoto(-o),a=l.getChatString(-o)}s.title=f.wrapPlainText(s.title),s.onclick=function(){t.$broadcast("history_focus",{peerString:a,messageID:16&e.flags?e.mid:0})},s.message=c,s.key="msg"+e.mid,s.tag=a,i.location&&!i.location.empty?h.downloadSmallFile(i.location,i.size).then(function(t){e.pFlags.unread&&(s.image=t,_.notify(s))}):_.notify(s)}function he(){i.cancel(tt),tt=!1,t.$broadcast("history_multiappend",nt),nt={}}function fe(){i.cancel(at),at=!1,angular.forEach(it,function(e){A(e)}),t.$broadcast("dialogs_multiupdate",it),it={}}function _e(){i.cancel(ot),ot=!1;var e=t.idle.isIDLE&&k.isOtherDeviceActive()?3e4:1e3;angular.forEach(st,function(t){t.isMutedPromise.then(function(n){var a=t.top_message;!n&&a.pFlags.unread&&setTimeout(function(){a.pFlags.unread&&ge(a,{fwd_count:t.fwd_count})},e)})}),st={}}function ve(n){var a=-n;return e.all([y.getChannelFull(n,!0),B(a,0)]).then(function(e){var i=e[0],o=e[1],s=o.history[0],r={_:"dialogChannel",peer:c.getOutputPeer(a),top_message:s,top_important_message:s,read_inbox_max_id:i.read_inbox_max_id,unread_count:i.unread_count,unread_important_count:i.unread_important_count,notify_settings:i.notify_settings};M(n,r);var l={};l[a]=r,t.$broadcast("dialogs_multiupdate",l)})}var ye,be={},we={},ke={},$e={},Ce={count:null,dialogs:[]},Se={},Me={},xe={},Ie=e.when(),Ae=-1,Ee=SearchIndexManager.createIndex(),Te={query:!1},De={},Pe=[],Fe=[],Re=!1,Ne={},Ue=[],Oe=!1,Be=0,Le=tsNow(!0),je=Le-Le%86400,qe=new Date;v.get("server_time_offset").then(function(e){e&&(Be=e)});var He=!1;Config.Modes.packed&&v.get("max_seen_msg").then(function(e){He=e||0});var Ve=a("dateOrTime"),ze=$.pluralize("conversation_forwarded_X_messages");qe.setHours(0),qe.setMinutes(0),qe.setSeconds(0),ye=je-Math.floor(+qe/1e3),_.start();var We=!1,Ge=0,Ke=0,Ye={},Ze={},Xe={},Je={},Qe=0,et=4294967296,tt=!1,nt={},at=!1,it={},ot=!1,st={};return t.$on("apiUpdate",function(e,n){switch(n._){case"updateMessageID":var a=n.random_id,o=Se[a];if(o){var s=o[0],d=c.isChannel(s)?-s:0;Me[T(n.id,d)]=a}break;case"updateNewMessage":case"updateNewChannelMessage":var u=n.message,s=ie(u),p=$e[s];if("updateNewChannelMessage"==n._){if(!l.isMegagroup(-s)&&!(u.pFlags.out||u.pFlags.mention||u.pFlags.post))break;var m=l.getChat(-s);if(m.pFlags&&(m.pFlags.left||m.pFlags.kicked))break}if(Y([u]),void 0!==p){var g=p.history;if(-1!=g.indexOf(u.mid))return!1;var h=g[0];g.unshift(u.mid),u.mid>0&&u.mid0&&E&&r.forceUserOnline(s),A=0;F>A;A++)if(x=g[A],!(x>D)&&(u=be[x],u.pFlags.out==E)){if(!u.pFlags.unread)break;u&&u.pFlags.unread&&(u.pFlags.unread=!1,we[x]&&(we[x].pFlags.unread=!1,R||(R=!0)),ke[x]&&(ke[x].pFlags.unread=!1),u.pFlags.out||(y&&(P=--y[0].unread_count),_.cancel("msg"+x)))}!E&&y&&(P&&y[0].top_message<=D&&(P=y[0].unread_count=0),y[0]||console.error("empty found dialog",y,n),y[0].read_inbox_max_id=D),P!==!1&&t.$broadcast("dialog_unread",{peerID:s,count:P}),R&&t.$broadcast("messages_read");break;case"updateReadMessagesContents":var A,x,u,N,U=n.messages,O=U.length;for(A=0;O>A;A++)x=U[A],(u=be[x])&&delete u.pFlags.media_unread,(N=we[x])&&delete N.pFlags.media_unread;break;case"updateDeleteMessages":case"updateDeleteChannelMessages":var x,u,A,s,y,g,B={},d=n.channel_id;for(A=0;A0&&(i.count-=e.count,i.count<0&&(i.count=0));for(var r=0;r0,z="channel"==L._&&(L.username||!L.pFlags.left&&!L.pFlags.kicked)&&!0||!1,W=void 0!==$e[s];z!=W&&(delete $e[s],t.$broadcast("history_forbidden",s)),V!=q&&(q?ve(d):y[0]&&(Ce.dialogs.splice(y[1],1),t.$broadcast("dialog_drop",{peerID:s})));break;case"updateChannelReload":var d=n.channel_id,s=-d,y=S(s);y[0]&&Ce.dialogs.splice(y[1],1),delete $e[s],ve(d).then(function(){t.$broadcast("history_reload",s)});break;case"updateChannelMessageViews":var G=n.views,$=T(n.id,n.channel_id),u=H($);u&&u.views&&u.views\n \n \n \n
\n
\n \n \n
\n [ \n \n \n \n \n \n \n \n \n ]\n \n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n'),e.put("partials/desktop/changelog_modal.html",'
\n\n
\n
\n
\n \n
\n
\n
\n\n
\n
\n \n
\n
\n
Telegram Web
\n
Version {{currentVersion}}
\n
\n
\n
\n\n
\n
\n \n \n \n
\n
\n\n
\n\n
\n\n
\n
0.5.4
\n
\n
    \n
  • Introducing Bot API 2.0, the biggest update to our bot platform since June 2015.
  • \n
  • New inline keyboards with callback, \'open URL\' or \'switch to inline mode\' buttons help create seamless interfaces.
  • \n
  • Bots can now update existing messages on the fly as you interact with them.
  • \n
  • Prepare for the rise of location-based bots: all bots can now ask users to share their location.
  • \n
  • Inline bots can now send all attachments supported in Telegram (videos, music, stickers, files, etc.).
  • \n
  • Try out these sample bots to see what\'s coming your way soon: @music, @sticker, @youtube, @foursquare
  • \n
  • Check out the Telegram Blog for more info.
  • \n
  • New quick forwarding in channels (click on the date in a message to try this out).
  • \n
  • Improved performance.
  • \n
\n\n
\n
\n\n
\n
0.5.3
\n
\n
    \n
  • Inline bots: A new way to add bot content to any chat. Type a bot\'s username and your query in the text field to get instant results and send them to your chat partner. Try typing @gif dog in your next chat. Sample bots: @gif, @wiki, @bing, @vid, @bold.
  • \n
  • Check out the Telegram Blog for more info.
  • \n
  • Improved GIFs: 20x faster sending and downloading, nice animated progress
  • \n
  • Click on message date to reply (or to forward from channels).
  • \n
  • Preview images before sending when pasting from clipboard.
  • \n
  • Improved formatting for copy-pasted history fragments (date, time and sender names inserted automatically).
  • \n
\n
\n
\n\n
\n
0.5.2
\n
\n
    \n
  • Unread counters for muted chats now colored in gray.
  • \n
  • Improved previews for sticker sets: Click on a sticker to view the whole set, click on stickers in a set to send right away, added a \'Share\' button.
  • \n
  • Improved performance.
  • \n
\n
\n
\n\n
\n
0.5.1
\n
\n
    \n
  • Groups that have reached their capacity of 200 users can be upgraded to supergroups of up to 1,000 members.
  • \n
  • Check out the Telegram Blog for more info
  • \n
\n
\n
\n\n
\n
0.5.0
\n
\n
    \n
  • Removed annoying "multiple tabs open" error.
  • \n
  • Improved message forwarding.
  • \n
  • Added view counter to messages from channels.
  • \n
  • Improved image loading in Safari and Firefox.
  • \n
\n
\n
\n\n
\n
0.4.9
\n
\n
    \n
  • New emoji and sticker menu, tabs for sticker packs.
  • \n
\n
\n
\n\n
\n
0.4.8
\n
\n
    \n
  • Introducing Channels – a great new way to broadcast your messages to unlimited audiences.
  • \n
  • Check out the Telegram Blog for more info
  • \n
  • Improved performance in Safari on OS X El Capitan.
  • \n
  • Added formatting for fixed-width code, surround text with `single backticks` for inline text and ```triple backticks``` for blocks of pre-formatted text.
  • \n
\n
\n
\n\n
\n
0.4.7
\n
\n
    \n
  • New bot API, free for everyone. If you\'re an engineer, create your own bots for games, services or integrations.\n
  • \n
  • Check out Telegram Blog for more info
  • \n
  • Improved Stickers support: now stickers are loading much faster.
  • \n
  • Click on any custom stickers in chats to view and add sticker sets.
  • \n
  • [Mobile] Reply to a message easily: tap on any message and select "Reply".
  • \n
\n
\n
\n\n
\n
0.4.6
\n
\n \n
\n
\n\n
\n
0.4.5
\n
\n
    \n
  • \n Invite links for group chats:
    \n Check out Telegram Blog for more info\n
  • \n
  • Smart notifications
  • \n
  • \'Listened\' status for voice messages
  • \n
  • Places in locations (venues, landmarks)
  • \n
\n
\n
\n\n
\n
0.4.4
\n
\n
    \n
  • Link Previews:
    \n Get rich link summaries for tweets, YouTube videos, Instagram photos and other content.
  • \n\n
  • Check out Telegram Blog for more info.
  • \n
\n
\n
\n\n
\n
0.4.3
\n
\n
    \n
  • Sessions List:
    \n View your active Telegram sessions (on desktop, tablet and mobile devices) and close specific sessions remotely.
  • \n\n
  • Two-step verification:
    \n Set up an additional password that will be required to log into your Telegram account.
  • \n\n
  • Check out Telegram Blog for more info.
  • \n
\n
\n
\n\n
\n
0.4.2
\n
\n
    \n
  • Optimization for screens with smaller Y-resolutions.
  • \n
  • Supported Spotify URL embeds.
  • \n
  • Mentions of the current user in group chats are now highlighted.
  • \n
\n
\n
\n\n
\n
0.4.1
\n
\n
    \n
  • Reply to specific messages in groups.
  • \n
  • Mention @usernames in groups to notify multiple users.
  • \n
  • Revised notifications in groups: mentioned users and people you reply to will be notified (private chat notification settings apply in this case instead of group settings). Check out Telegram Blog for more info.
  • \n
  • Setting to disable message preview
  • \n
\n
\n
\n\n
\n
0.4.0
\n
\n
    \n
  • Full stickers support
  • \n
  • Multisearch box: instantly find chats, usernames and messages
  • \n
  • Emoji autocomplete: e.g., type :kiss in the message field to see the list. Full cheat sheet »
  • \n
  • Added \'typing\' notification in chats list
  • \n
  • Online members counter in group headers
  • \n
\n
\n
\n\n
\n
0.3.9
\n
\n
    \n
  • [Desktop] Material design completed
  • \n
\n
\n
\n\n
\n
0.3.8
\n
\n
    \n
  • Telegram.me links open right in Telegram Web when authorized
  • \n
  • @username mentions in messages are clickable and open a conversation with the user
  • \n
\n
\n
\n\n
\n
0.3.7
\n
\n
    \n
  • [Desktop] New material design for modal windows
  • \n
  • [Desktop] Forward messages to multiple recipients
  • \n
\n
\n
\n\n
\n
0.3.6
\n
\n
    \n
  • New viewer for photos, videos, documents.
  • \n
  • [FirefoxOS] Improved media downloads.
  • \n
\n
\n
\n\n
\n
0.3.5
\n
\n
    \n
  • Added embedded Soundcloud tracks and playlists.
  • \n
  • Added global user search to contacts list.
  • \n
  • Added switch to mobile version on window resize.
  • \n
  • Migrate to HTTPS notification
  • \n
  • Bugfixes.
  • \n
\n
\n
\n\n
\n
0.3.4
\n
\n
    \n
  • Added embedded Facebook posts and Vimeo videos.
  • \n
  • Improved IE10+ support: downloading files and style fixes.
  • \n
  • Added unsupported media playback warning.
  • \n
  • Bugfixes.
  • \n
\n
\n
\n\n
\n
0.3.3
\n
\n
    \n
  • Added Native Client module: dramatically improved encryption speed; Download and upload speed is now as high as in native applications.
  • \n
  • HTTPS. We recommend you to use https://web.telegram.org.
  • \n
  • Added multiple open tabs warning. Please note, that only one tab with Telegram Web will work.
  • \n
  • Added embedded Instagram, Twitter, Vine, YouTube links.
  • \n
  • Jump to selected spot when playing back audio.
  • \n
  • Bugfixes
  • \n
\n
\n
\n\n
\n
0.3.2
\n
\n
    \n
  • Usernames support: Choose a username right now!
  • \n
  • Search can now find public users by username.
  • \n
  • Most popular emoticons shown in \'recent\' when empty
  • \n
  • [ChromeApp] Added saving window position and size
  • \n
  • Bugfixes
  • \n
\n
\n
\n\n
\n
0.3.1
\n
\n
    \n
  • New languages: Spanish, German and Italian are now available
  • \n
  • New custom-made audio player
  • \n
  • Bad browser page for IE 6-9
  • \n
  • Perfomance improvements and bugfixes
  • \n
\n
\n
\n\n
\n
0.3.0
\n
\n
    \n
  • Log in codes may be received in other Telegram apps
  • \n
  • Partner\'s online status updates automatically
  • \n
  • Added support for non-english hashtags in messages
  • \n
  • Fixed invalid scrollbar width bug
  • \n
  • [Desktop] Added automatic country code detection
  • \n
  • [FirefoxOS] Improved PUSH-notifications for <= 1.1
  • \n
  • [FirefoxOS] Fixed emoji in notifications
  • \n
  • [FirefoxOS] Fixed attachment bug for <= 1.1
  • \n
  • [FirefoxOS] Added phonebook permissions handling
  • \n
  • [FirefoxOS] Added ability to share Gallery photos in Telegram
  • \n
\n
\n
\n\n
\n\n\n \n\n
\n\n
'),e.put("partials/desktop/channel_edit_modal.html",'
\n\n
\n\n \n\n
\n\n \n\n
'), e.put("partials/desktop/channel_modal.html",'
\n\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n\n
\n
\n
\n \n \n
\n \n \n \n
\n
\n\n
\n\n
\n\n
\n \n\n
\n
\n \n
\n
\n
\n\n
\n
\n \n
\n
\n
\n\n
\n
\n \n \n \n \n
\n
\n
\n
\n\n \n\n
\n \n\n \n \n \n \n\n
\n\n \n\n
\n\n
\n\n
\n\n
\n \n\n
\n\n
\n\n \n \n\n \n\n
\n \n
\n
\n
\n\n
\n\n
\n\n
\n
\n\n\n
\n'),e.put("partials/desktop/chat_create_modal.html",'
\n\n
\n\n \n\n
\n\n \n\n
'),e.put("partials/desktop/chat_edit_modal.html",'
\n\n
\n\n \n\n
\n\n \n\n
'),e.put("partials/desktop/chat_invite_link_modal.html",'
\n\n
\n\n \n\n
\n\n \n\n
'),e.put("partials/desktop/chat_modal.html",'
\n\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n\n
\n
\n
\n \n \n
\n
\n
\n\n
\n\n
\n\n \n\n \n\n
\n \n\n \n \n \n \n\n
\n\n \n\n \n\n
\n\n
\n\n
\n
\n

\n

\n
    \n
  • \n
  • \n
  • \n
  • \n
\n
\n
\n
\n\n
\n \n\n
\n\n
\n\n \n \n\n \n\n
\n \n
\n
\n
\n\n
\n\n
\n\n
\n
\n\n\n
\n'),e.put("partials/desktop/composer_dropdown.html",'
\n\n \n\n \n\n
    \n\n
    \n\n
    '),e.put("partials/desktop/confirm_modal.html",'
    \n\n
    \n\n
    \n \n \n \n \n \n\n \n \n \n \n
    \n \n
    \n
    \n \n \n \n \n \n \n \n
    \n \n
    \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n\n\n\n \n \n \n \n
    \n\n
    \n\n \n\n
    \n'),e.put("partials/desktop/contacts_modal.html",'
    \n\n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n \n
    \n
    \n\n
    \n\n \n\n
    \n\n
    \n
    \n\n
    \n {0}\n
    \n\n \n\n
    \n
    \n\n
    \n\n
    \n\n \n\n
    \n'),e.put("partials/desktop/country_select_modal.html",'
    \n\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n\n
    \n\n \n\n
    \n\n
    \n
    \n\n \n\n
    \n
    \n\n
    \n\n
    \n\n
    \n'),e.put("partials/desktop/dialog.html",'\n\n
    \n
    \n \n \n
    \n\n
    \n\n
    \n\n
    \n \n
    \n\n
    \n \n \n \n
    \n\n
    \n
    \n \n
    \n
    \n \n \n \n :\n \n \n \n \n :\n \n \n \n\n \n
    \n
    \n\n
    \n
    \n'), e.put("partials/desktop/document_modal.html",'\n\n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n
    \n\n
    \n \n
    \n \n
    \n
    \n \n \n
    \n
    \n\n
    \n\n
    \n
    \n\n'),e.put("partials/desktop/edit_contact_modal.html",'
    \n\n
    \n\n \n\n
    \n\n \n\n
    '),e.put("partials/desktop/embed_modal.html",'\n\n
    \n
    \n
    \n \n \n \n \n \n \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n\n'),e.put("partials/desktop/emoji_btn_tooltip.html",'
    \n\n
    \n
    \n\n
    \n \n
    \n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n\n \n \n \n\n
    '),e.put("partials/desktop/error_modal.html",'
    \n\n
    \n\n

    \n \n \n \n \n \n \n \n \n \n \n \n \n

    \n

    \n \n \n

    \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {0}\n \n\n\n
    \n \n \n {0}\n \n \n \n \n \n
    \n\n
    \n\n
    \n \n
    \n \n
    \n
    \n\n
    \n\n
    \n\n \n\n
    \n'),e.put("partials/desktop/footer.html",''),e.put("partials/desktop/forwarded_messages.html",'
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n \n \n \n \n
    \n
    \n
    '),e.put("partials/desktop/full_document.html",'
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    '),e.put("partials/desktop/full_gif.html",'\n\n
    \n\n
    \n
    \n \n \n \n \n
    \n
    \n
    [GIF]
    \n
    \n\n
    \n \n \n
    \n \n\n
    \n\n
    '),e.put("partials/desktop/full_photo.html",'
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    '),e.put("partials/desktop/full_video.html",'
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n
    '),e.put("partials/desktop/head.html",'
    \n
    \n\n
    \n \n
    \n\n
    \n
    \n \n \n \n
    \n\n
    \n\n \n\n \n\n \n \n \n \n \n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n\n \n
    \n \n \n \n \n \n
    \n
    \n\n
    \n\n
    \n
    \n
    \n
    '),e.put("partials/desktop/im.html",'
    \n\n
    \n\n
    \n\n
    \n
    \n \n
    \n\n
    \n
    \n
    \n\n
    \n

    \n

    \n \n \n
    \n\n \n\n
    \n
    \n \n
    \n\n
    \n
    \n \n
    \n\n
    \n
    \n \n
    \n\n
    \n
    \n
    \n
    \n\n
    \n\n
    \n
    \n

    \n

    \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n
    \n
    \n \n \n \n \n \n {{historyState.typing.length - 2}}\n \n
    \n
    \n\n
    \n\n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n\n
    \n\n
    \n\n
    \n\n \n \n \n \n\n
    \n\n
    \n\n
    \n \n \n
    \n\n
    \n \n
    \n
    \n\n
    \n \n
    \n
    \n
    \n \n \n\n
    \n \n
    \n\n
    \n \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n
    \n\n
    \n
    \n
    \n\n
    \n
    \n\n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n\n
    \n\n
    \n\n\n\n\n'), e.put("partials/desktop/import_contact_modal.html",'
    \n\n
    \n\n \n\n
    \n\n \n\n
    '),e.put("partials/desktop/inactive.html",'
    \n
    \n
    \n
    \n \n

    \n
    \n
    \n \n
    \n
    \n
    \n
    '),e.put("partials/desktop/inline_results.html",'\n\n'),e.put("partials/desktop/lang_footer.html",''),e.put("partials/desktop/login.html",'\n\n'),e.put("partials/desktop/media_modal_layout.html",''),e.put("partials/desktop/megagroup_edit_modal.html",'
    \n\n
    \n\n \n\n
    \n\n \n\n
    '),e.put("partials/desktop/message.html",'
    \n\n\n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n\n \n \n \n\n
    \n\n
    \n \n\n \n \n \n \n\n \n\n
    \n
    \n
    \n \n
    \n
    \n \n
    \n\n
    \n\n \n []  :\n \n\n\n \n\n
    \n \n \n
    \n   [\n \n \n \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n\n\n
    \n\n
    \n
    \n\n
    \n\n'),e.put("partials/desktop/message_attach_contact.html",'
    \n \n
    \n \n \n
    \n
    \n
    '),e.put("partials/desktop/message_attach_document.html",'
    \n\n
    \n\n
    \n\n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n \n \n \n \n \n\n
    \n
    \n [ ]\n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n \n \n \n \n
    \n \n
    \n
    \n\n
    \n
    \n []\n \n \n
    \n
    \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n'),e.put("partials/desktop/message_attach_geo.html",'\n \n \n'),e.put("partials/desktop/message_attach_pending.html",'
    \n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n'),e.put("partials/desktop/message_attach_photo.html",'\n \n\n
    '),e.put("partials/desktop/message_attach_venue.html",'
    \n\n \n \n \n \n\n
    \n
    \n \n
    \n
    \n
    \n\n
    \n'),e.put("partials/desktop/message_attach_webpage.html",'
    \n
    \n
    \n \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n \n \n \n \n
    \n\n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n\n
    \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n'), e.put("partials/desktop/message_media.html",'
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    '),e.put("partials/desktop/message_service.html",'\n \n \n \n «»\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n «»\n \n \n \n\n \n \n \n\n\n \n \n \n\n'),e.put("partials/desktop/password_recovery_modal.html",'
    \n\n
    \n\n \n\n
    \n\n \n\n
    '),e.put("partials/desktop/password_update_modal.html",'
    \n\n
    \n\n \n\n
    \n\n \n\n
    '),e.put("partials/desktop/peer_select.html",'
    \n\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n \n\n \n\n
    \n'),e.put("partials/desktop/photo_modal.html",'\n\n\n\n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n
    \n\n
    \n \n
    \n \n
    \n
    \n \n \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n\n
    \n \n \n \n \n \n
    \n
    \n
    \n\n\n\n'),e.put("partials/desktop/pinned_message.html",''),e.put("partials/desktop/profile_edit_modal.html",'
    \n\n
    \n\n \n\n
    \n\n \n\n
    \n'),e.put("partials/desktop/reply_markup.html",'
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    '),e.put("partials/desktop/reply_message.html",'
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    '),e.put("partials/desktop/sessions_list_modal.html",'
    \n\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n \n \n \n
    \n\n \n\n
    \n
    \n\n
    \n\n
    \n\n
    \n'),e.put("partials/desktop/settings_modal.html",'
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n\n
    \n\n
    \n \n\n
    \n
    \n
    \n
    \n\n
    \n
    \n \n \n
    \n
    \n
    \n
    \n\n
    \n \n\n \n \n \n \n\n \n \n \n \n\n \n \n \n \n\n
    \n
    \n
    \n\n
    \n\n
    \n \n\n \n\n
    \n\n \n\n
    \n\n
    \n\n
    \n'),e.put("partials/desktop/short_message.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'), -e.put("partials/desktop/slider.html",'
    \n
    \n
    \n
    \n
    \n
    '),e.put("partials/desktop/stickerset_modal.html",'
    \n\n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n \n \n \n
    \n\n
    \n \n
    \n
    \n
    \n
    \n\n
    \n
    \n\n
    \n\n
    \n
    \n \n \n \n
    \n
    \n\n
    \n\n
    \n'),e.put("partials/desktop/user_modal.html",'
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n \n \n \n
    \n
    \n\n\n
    \n\n
    \n\n
    \n \n\n
    \n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n
    \n\n
    \n \n\n \n \n \n \n\n
    \n\n \n\n
    \n\n
    \n\n
    \n\n'),e.put("partials/desktop/username_edit_modal.html",'
    \n\n
    \n\n \n\n
    \n\n \n\n
    '),e.put("partials/desktop/video_modal.html",'\n\n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n
    \n\n
    \n \n
    \n \n
    \n
    \n \n \n
    \n
    \n\n
    \n
    \n
    \n\n'),e.put("partials/desktop/welcome.html",""),e.put("partials/mobile/audio_player.html",'
    \n \n \n \n
    \n
    \n \n \n
    \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    '),e.put("partials/mobile/changelog_modal.html",'
    \n\n \n\n \n\n
    \n'), +e.put("partials/desktop/slider.html",'
    \n
    \n
    \n
    \n
    \n
    '),e.put("partials/desktop/stickerset_modal.html",'
    \n\n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n \n \n \n
    \n\n
    \n \n
    \n
    \n
    \n
    \n\n
    \n
    \n\n
    \n\n
    \n
    \n \n \n \n
    \n
    \n\n
    \n\n
    \n'),e.put("partials/desktop/user_modal.html",'
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n \n \n \n
    \n
    \n\n\n
    \n\n
    \n\n
    \n \n\n
    \n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n
    \n\n
    \n \n\n \n \n \n \n\n
    \n\n \n\n
    \n\n
    \n\n
    \n\n'),e.put("partials/desktop/username_edit_modal.html",'
    \n\n
    \n\n \n\n
    \n\n \n\n
    '),e.put("partials/desktop/video_modal.html",'\n\n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n
    \n\n
    \n \n
    \n \n
    \n
    \n \n \n
    \n
    \n\n
    \n
    \n
    \n\n'),e.put("partials/desktop/welcome.html",""),e.put("partials/mobile/audio_player.html",'
    \n \n \n \n
    \n
    \n \n \n
    \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    '),e.put("partials/mobile/changelog_modal.html",'
    \n\n \n\n \n\n
    \n'), e.put("partials/mobile/channel_modal.html",'
    \n\n
    \n \n
    \n\n \n\n
    \n'),e.put("partials/mobile/chat_create_modal.html",'
    \n\n
    \n \n
    \n\n \n\n
    '),e.put("partials/mobile/chat_edit_modal.html",'
    \n\n
    \n \n
    \n\n \n\n
    '),e.put("partials/mobile/chat_modal.html",'
    \n\n
    \n \n
    \n\n \n\n
    \n'),e.put("partials/mobile/contacts_modal.html",'
    \n\n
    \n \n
    \n\n \n\n
    \n'),e.put("partials/mobile/country_select_modal.html",'
    \n\n
    \n \n
    \n\n \n\n
    \n'),e.put("partials/mobile/dialog.html",'\n\n
    \n
    \n \n \n
    \n\n
    \n\n
    \n\n
    \n \n
    \n\n
    \n \n \n \n
    \n\n
    \n
    \n \n
    \n
    \n \n \n \n :\n \n \n \n \n :\n \n \n \n\n \n
    \n
    \n\n
    \n
    \n'),e.put("partials/mobile/edit_contact_modal.html",'
    \n\n
    \n \n
    \n\n \n\n
    '),e.put("partials/mobile/full_gif.html",'\n\n
    \n\n
    \n
    \n \n \n \n \n
    \n
    \n
    GIF
    \n
    \n\n
    \n \n \n
    \n \n\n
    \n\n
    '),e.put("partials/mobile/full_photo.html",'
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    '),e.put("partials/mobile/full_video.html",'
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n
    '),e.put("partials/mobile/head.html",'
    \n \n
    \n'), e.put("partials/mobile/im.html",'
    \n\n
    \n\n
    \n\n
    \n
    \n \n
    \n\n
    \n\n
    \n

    \n

    \n \n \n
    \n\n \n\n
    \n
    \n \n
    \n\n
    \n
    \n \n
    \n\n
    \n
    \n \n
    \n\n
    \n
    \n\n
    \n\n
    \n \n
    \n\n
    \n
    \n\n
    \n\n
    \n
    \n
    \n \n \n \n \n
    \n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n \n \n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n \n \n\n
    \n
    \n
    \n\n
    \n \n
    \n\n
    \n \n \n
    \n\n \n\n \n
    \n\n\n
    \n
    \n
    \n\n
    \n
    \n\n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n\n
    \n\n
    \n\n'),e.put("partials/mobile/import_contact_modal.html",'
    \n\n
    \n \n
    \n\n \n
    '),e.put("partials/mobile/login.html",'
    \n \n
    \n\n\n\n\n'),e.put("partials/mobile/message.html",'
    \n\n\n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n\n \n \n \n\n
    \n\n
    \n\n \n\n
    \n
    \n
    \n \n
    \n
    \n \n \n \n \n \n
    \n\n
    \n
    \n\n \n \n\n \n\n
    \n \n \n \n \n
    \n\n
    \n
    \n\n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n\n'),e.put("partials/mobile/message_actions_modal.html",'
    \n\n
    \n \n \n \n \n \n
    \n\n
    \n'),e.put("partials/mobile/message_attach_contact.html",'
    \n \n
    \n \n \n
    \n
    \n
    '),e.put("partials/mobile/message_attach_document.html",'
    \n\n
    \n\n
    \n\n
    \n
    \n
    \n\n
    \n
    \n
    \n\n \n\n
    \n\n \n \n \n \n
    \n \n
    \n
    \n\n
    \n
    \n \n \n \n
    \n
    \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n'), e.put("partials/mobile/message_attach_geo.html",'\n \n \n'),e.put("partials/mobile/message_attach_pending.html",'
    \n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n'),e.put("partials/mobile/message_attach_photo.html",'\n \n\n
    '),e.put("partials/mobile/message_attach_venue.html",'
    \n\n \n \n \n \n\n
    \n
    \n \n
    \n
    \n
    \n\n
    \n'),e.put("partials/mobile/message_attach_webpage.html",'
    \n
    \n
    \n
    \n \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n \n \n \n \n
    \n\n
    \n
    \n \n \n \n
    \n \n
    \n
    \n
    \n
    \n'),e.put("partials/mobile/message_service.html",'\n \n \n \n «»\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n «»\n \n \n \n\n \n \n \n\n \n \n \n\n'),e.put("partials/mobile/password_recovery_modal.html",'
    \n\n
    \n \n
    \n\n \n\n
    '),e.put("partials/mobile/password_update_modal.html",'
    \n\n
    \n \n
    \n\n \n\n
    '),e.put("partials/mobile/peer_select.html",'
    \n\n
    \n \n
    \n\n \n\n
    \n'),e.put("partials/mobile/phonebook_modal.html",'
    \n\n
    \n \n
    \n\n \n\n \n\n
    \n'),e.put("partials/mobile/photo_modal.html",'
    \n
    \n
    \n \n \n \n
    \n\n
    \n \n \n \n
    \n\n
    \n \n
    \n \n
    \n\n
    \n
    \n\n\n\n\n\n'),e.put("partials/mobile/profile_edit_modal.html",'
    \n\n
    \n \n
    \n\n \n\n
    '),e.put("partials/mobile/sessions_list_modal.html",'
    \n\n
    \n \n
    \n\n \n\n
    \n'),e.put("partials/mobile/settings_modal.html",'
    \n\n
    \n \n
    \n\n \n
    \n'), diff --git a/js/locales/de-de.json b/js/locales/de-de.json index 2b952220..2223bbe3 100644 --- a/js/locales/de-de.json +++ b/js/locales/de-de.json @@ -194,6 +194,7 @@ "confirm_modal_contacts_import": "Telegram wird nun deine Kontakte synchronisieren, um deine Freundesliste zusammenzustellen.", "confirm_modal_login_phone_correct": "Stimmt die Nummer wirklich?", "confirm_modal_forward_to_peer": "An {peer} weiterleiten?", + "confirm_modal_forward_to_peer_success": "Message was successfully forwarded.", "confirm_modal_send_to_peer": "An {peer} senden?", "confirm_modal_share_file_peer": "Mit {peer} teilen?", "confirm_modal_invite_peer": "In {peer} einladen?", diff --git a/js/locales/es-es.json b/js/locales/es-es.json index edfff211..e4cf658b 100644 --- a/js/locales/es-es.json +++ b/js/locales/es-es.json @@ -194,6 +194,7 @@ "confirm_modal_contacts_import": "Telegram sincronizará tus contactos para encontrar a tus amigos.", "confirm_modal_login_phone_correct": "¿Es correcto este número?", "confirm_modal_forward_to_peer": "¿Reenviar a {peer}?", + "confirm_modal_forward_to_peer_success": "Message was successfully forwarded.", "confirm_modal_send_to_peer": "¿Enviar a {peer}?", "confirm_modal_share_file_peer": "¿Compartir con {peer}?", "confirm_modal_invite_peer": "¿Invitar a {peer}?", @@ -279,7 +280,7 @@ "conversation_changed_channel_name": "Canal renombrado", "conversation_changed_channel_photo": "Foto del canal actualizada", "conversation_removed_channel_photo": "Foto del canal eliminada", - "conversation_pinned_message": "mensaje anclado", + "conversation_pinned_message": "ancló un mensaje", "conversation_message_sent": "te envió un mensaje", "conversation_forwarded_X_messages": "{'one': '{} mensaje reenviado', 'other': '{} mensajes reenviados'}", "conversation_unknown_user": "Alguien", diff --git a/js/locales/it-it.json b/js/locales/it-it.json index 09f5c836..aec6075a 100644 --- a/js/locales/it-it.json +++ b/js/locales/it-it.json @@ -194,6 +194,7 @@ "confirm_modal_contacts_import": "Telegram sincronizzerà ora i tuoi contatti per cercare i tuoi amici.", "confirm_modal_login_phone_correct": "Il tuo numero di telefono è giusto?", "confirm_modal_forward_to_peer": "Inoltra a {peer}?", + "confirm_modal_forward_to_peer_success": "Il messaggio è stato inoltrato con successo.", "confirm_modal_send_to_peer": "Invia a {peer}?", "confirm_modal_share_file_peer": "Condividi con {peer}?", "confirm_modal_invite_peer": "Invitare in {peer}?", diff --git a/js/locales/nl-nl.json b/js/locales/nl-nl.json index 3eb8bfb8..60153678 100644 --- a/js/locales/nl-nl.json +++ b/js/locales/nl-nl.json @@ -194,6 +194,7 @@ "confirm_modal_contacts_import": "Telegram zal nu je contacten synchroniseren om je vrienden te kunnen vinden.", "confirm_modal_login_phone_correct": "Is dit telefoonnummer juist?", "confirm_modal_forward_to_peer": "Doorsturen naar {peer}?", + "confirm_modal_forward_to_peer_success": "Doorsturen gelukt", "confirm_modal_send_to_peer": "Versturen naar {peer}?", "confirm_modal_share_file_peer": "Delen met {peer}?", "confirm_modal_invite_peer": "Toevoegen aan {peer}?", diff --git a/js/locales/pt-br.json b/js/locales/pt-br.json index 3c571eab..4f4e5078 100644 --- a/js/locales/pt-br.json +++ b/js/locales/pt-br.json @@ -194,6 +194,7 @@ "confirm_modal_contacts_import": "Telegram sincronizará os seus contatos para encontrar seus amigos.", "confirm_modal_login_phone_correct": "O número de telefone está correto?", "confirm_modal_forward_to_peer": "Encaminhar para {peer}?", + "confirm_modal_forward_to_peer_success": "Message was successfully forwarded.", "confirm_modal_send_to_peer": "Enviar para {peer}?", "confirm_modal_share_file_peer": "Compartilhar com {peer}?", "confirm_modal_invite_peer": "Convidar para {peer}?", diff --git a/js/locales/ru-ru.json b/js/locales/ru-ru.json index 268bdb5c..84b17163 100644 --- a/js/locales/ru-ru.json +++ b/js/locales/ru-ru.json @@ -194,6 +194,7 @@ "confirm_modal_contacts_import": "Telegram выполнит синхронизацию ваших контактов, чтобы найти ваших друзей.", "confirm_modal_login_phone_correct": "Проверьте ещё раз ваш номер:", "confirm_modal_forward_to_peer": "Переслать пользователю {peer}?", + "confirm_modal_forward_to_peer_success": "Message was successfully forwarded.", "confirm_modal_send_to_peer": "Отправить пользователю {peer}?", "confirm_modal_share_file_peer": "Поделиться с {peer}?", "confirm_modal_invite_peer": "Пригласить в {peer}?", diff --git a/webogram.appcache b/webogram.appcache index 23735af5..4fc9c7e3 100644 --- a/webogram.appcache +++ b/webogram.appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# Time: Fri Apr 22 2016 20:22:57 GMT+0300 (MSK) +# Time: Sat Apr 23 2016 21:47:57 GMT+0300 (MSK) CACHE: