telegram-tt/dist/302.50d4310230e3a2e5c85c.js

2 lines
24 KiB
JavaScript
Raw Normal View History

2022-02-02 22:56:06 +01:00
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[302],{2275:(t,e,a)=>{a.d(e,{Z:()=>h});var s=a(4050),o=a(5116),n=a(9066),i=a(8415),d=a(2340),r=a(9107),c=a(3103),l=a(231);const h=(0,s.X$)((0,o.c$)(((t,e)=>{let{userId:a}=e;const s=(0,n.jr)(t),o=a&&(0,n.dy)(t,a);return{chat:s,contactName:o?(0,i.Vl)(o):void 0}}))((t=>{let{isOpen:e,chat:a,userId:n,contactName:i,onClose:h}=t;const{deleteChatMember:u}=(0,o.uC)(),p=(0,r.Z)(),f=(0,s.I4)((()=>{u({chatId:a.id,userId:n}),h()}),[a,u,h,n]);if(a&&n)return s.ZP.createElement(c.Z,{isOpen:e,onClose:h,onEnter:f,className:"delete",title:p("GroupRemoved.Remove")},s.ZP.createElement("p",null,(0,d.Z)(p("PeerInfo.Confirm.RemovePeer",i))),s.ZP.createElement(l.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:f},p("lng_box_remove")),s.ZP.createElement(l.Z,{className:"confirm-dialog-button",isText:!0,onClick:h},p("Cancel")))})))},6204:(t,e,a)=>{a.d(e,{f:()=>b,C:()=>w});var s=a(5116),o=a(6137),n=a(1713),i=a(3716),d=a(1226),r=a(9959),c=a(9066),l=a(782),h=a(9118),u=a(8415),p=a(3551),f=a(4446),C=a(2607),I=a(6974);const m=(0,h.P2)((t=>t()),300,!0),g=(0,h.P2)((t=>t()),3e3,!0),v=(0,h.Ds)((t=>t()),500,!1,!0);async function y(t,e,a){var n;let h=(0,s.Rd)();const u=await(0,d.t9)("fetchChats",{limit:i.Ov,offsetDate:a,archived:"archived"===t,withPinned:void 0===h.chats.orderedPinnedIds[t],serverTimeOffset:h.serverTimeOffset,lastLocalServiceMessage:null===(n=(0,c.VF)(h))||void 0===n?void 0:n.message});if(!u)return;const{chatIds:p}=u;p.length>0&&p[0]===e&&p.shift(),h=(0,s.Rd)(),h=(0,r.Sh)(h,(0,l.ee)(u.users,"id")),h=(0,r.zn)(h,u.userStatusesById),h=(0,r.GL)(h,(0,l.ee)(u.chats,"id")),h=(0,r.B1)(h,t,p),h=(0,r.vv)(h,t,u),Object.keys(u.draftsById).forEach((t=>{h=(0,r.pf)(h,t,o._f,"draft",u.draftsById[t])})),Object.keys(u.replyingToById).forEach((t=>{h=(0,r.pf)(h,t,o._f,"replyingToId",u.replyingToById[t])})),0!==p.length||h.chats.isFullyLoaded[t]||(h={...h,chats:{...h.chats,isFullyLoaded:{...h.chats.isFullyLoaded,[t]:!0}}}),(0,s.R3)(h)}async function b(t){const e=await(0,d.t9)("fetchFullChat",t);if(!e)return;const{users:a,fullInfo:o,groupCall:n}=e;let i=(0,s.Rd)();if(a&&(i=(0,r.Sh)(i,(0,l.ee)(a,"id"))),n){const t=(0,C.$5)(i,n.id);i=(0,f.AH)(i,n.id,(0,l.CE)(n,["connectionState"]),void 0,t?void 0:n.participantsCount)}return i=(0,r.a4)(i,t.id,{fullInfo:o}),(0,s.R3)(i),e}async function w(t){const e=(0,s.Rd)(),a=(0,c.DI)(e,t);if(a&&!a.isMin)return a;const o=await(0,d.t9)("getChatByUsername",t);return o?((0,s.R3)((0,r.a4)((0,s.Rd)(),o.id,o)),o):void 0}(0,s.Q6)("preloadTopChatMessages",((t,e)=>{(async()=>{const a=new Set;for(let s=0;s<i.ul;s++){await(0,h.wO)(100);const{chatId:s}=(0,c.Bt)(t)||{},n=(0,I.gO)(i.Nf),d=null==n?void 0:n.find((t=>t!==s&&!a.has(t)));if(!d)return;a.add(d),e.loadViewportMessages({chatId:d,threadId:o._f})}})()})),(0,s.Q6)("openChat",((t,e,a)=>{const{id:s,threadId:n}=a,{currentUserId:i}=t,r=(0,c.Z1)(t,s);if(null!=r&&r.hasUnreadMark&&e.toggleChatUnread({id:s}),r&&r.lastMessage&&r.lastMessage.threadInfo&&e.requestThreadInfoUpdate({chatId:r.lastMessage.threadInfo.chatId,threadId:r.lastMessage.threadInfo.threadId}),r)(0,u.Hp)(r)&&!r.isMin&&e.requestChatUpdate({chatId:s});else if(s===i)(0,d.t9)("fetchChat",{type:"self"});else{const e=(0,c.dy)(t,s);e&&(0,d.t9)("fetchChat",{type:"user",user:e})}n!==o._f&&((0,c.qS)(t,s,n)||e.requestThreadInfoUpdate({chatId:s,threadId:n}))})),(0,s.Q6)("openLinkedChat",((t,e,a)=>{const{id:s}=a,o=(0,c.Z1)(t,s);o&&(async()=>{var t;const a=await(0,d.t9)("fetchFullChat",o);null!=a&&null!==(t=a.fullInfo)&&void 0!==t&&t.linkedChatId&&e.openChat({id:a.fullInfo.linkedChatId})})()})),(0,s.Q6)("focusMessageInComments",((t,e,a)=>{const{chatId:s,threadId:o,messageId:n}=a,i=(0,c.Z1)(t,s);i&&(async()=>{await(0,d.t9)("requestThreadInfoUpdate",{chat:i,threadId:o})&&e.focusMessage({chatId:s,threadId:o,messageId:n})})()})),(0,s.Q6)("openSupportChat",((t,e)=>{const a=(0,c.P_)(t);a?e.openChat({id:a.id,shouldReplaceHistory:!0}):(e.openChat({id:i.AJ,shouldReplaceHistory:!0}),(async()=>{const t=await(0,d.t9)("fetchChat",{type:"support"});t&&e.openCh
//# sourceMappingURL=302.50d4310230e3a2e5c85c.js.map