telegram-tt/dist/884.bf91279ce235c0463204.js

2 lines
24 KiB
JavaScript
Raw Normal View History

2022-01-10 15:19:13 +01:00
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[884],{2275:(t,e,a)=>{a.d(e,{Z:()=>h});var s=a(4050),o=a(5116),n=a(1638),i=a(2858),d=a(2340),r=a(9107),c=a(3103),l=a(231);const h=(0,s.X$)((0,o.c$)(((t,{userId:e})=>{const a=(0,n.jr)(t),s=e&&(0,n.dy)(t,e);return{chat:a,contactName:s?(0,i.Vl)(s):void 0}}))((({isOpen:t,chat:e,userId:a,contactName:n,onClose:i})=>{const{deleteChatMember:h}=(0,o.uC)(),u=(0,r.Z)(),p=(0,s.I4)((()=>{h({chatId:e.id,userId:a}),i()}),[e,h,i,a]);if(e&&a)return s.ZP.createElement(c.Z,{isOpen:t,onClose:i,onEnter:p,className:"delete",title:u("GroupRemoved.Remove")},s.ZP.createElement("p",null,(0,d.Z)(u("PeerInfo.Confirm.RemovePeer",n))),s.ZP.createElement(l.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:p},u("lng_box_remove")),s.ZP.createElement(l.Z,{className:"confirm-dialog-button",isText:!0,onClick:i},u("Cancel")))})))},6071:(t,e,a)=>{a.d(e,{Z:()=>n});var s=a(4050),o=a(9118);const n=(t,e=!1)=>(0,s.Ye)((()=>(0,o.P2)((t=>t()),t,!e)),[t,e])},6204:(t,e,a)=>{a.d(e,{f:()=>y,C:()=>b});var s=a(5116),o=a(6137),n=a(1713),i=a(3716),d=a(1226),r=a(307),c=a(1638),l=a(782),h=a(9118),u=a(2858),p=a(3551),f=a(4446),C=a(2607);const I=(0,h.P2)((t=>t()),300,!0),m=(0,h.P2)((t=>t()),3e3,!0),g=(0,h.Ds)((t=>t()),500,!1,!0);async function v(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 y(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 b(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=[];for(let n=0;n<i.ul;n++){await(0,h.wO)(100);const{byId:n,listIds:{active:i},orderedPinnedIds:{active:d}}=(0,s.Rd)().chats;if(!i)return;const{chatId:r}=(0,c.Bt)(t)||{},{pinnedChats:l,otherChats:p}=(0,u.O)(n,i,d,"all",!0),f=[...l,...p].find((({id:t})=>t!==r&&!a.includes(t)));if(!f)return;a.push(f.id),e.loadViewportMessages({chatId:f.id,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}
2022-01-13 01:15:19 +01:00
//# sourceMappingURL=884.bf91279ce235c0463204.js.map