From b200dc25253f926496cc81b8502e57711543c1d1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 6 Sep 2026 16:05:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=95=BF=E6=8C=89=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E8=8F=9C=E5=8D=95"=E6=92=A4=E5=9B=9E"=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=AE=8C=E5=85=A8=E5=A4=B1=E6=95=88=EF=BC=9ALOCAL=5FS?= =?UTF-8?q?EQID=20=E7=BB=8F=20webpack=20externals=20=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E4=B8=BA=20undefined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 现象:验证第2章长按消息弹出菜单的时间窗口门控时发现,无论消息是不是自己刚发的、群主/普通 成员、发送后多少秒,长按菜单里永远不出现"撤回"这一项——服务端 messagePolicy 明确返回 recall_window_seconds=120,但这个选项在任何情况下都不会出现。 根因:messages-view.jsx 原来 `import { ..., LOCAL_SEQID } from 'tinode-sdk'`,但 webpack.config.js 把 'tinode-sdk' 映射到全局变量 `tinode`(externals: {'tinode-sdk': 'tinode'}), 而这个全局对象(umd/tinode.dev.js 的 UMD 导出)只挂了 {AccessMode, Drafty, TheCard, Tinode} 四个键,从未包含 LOCAL_SEQID——尽管 tinode-sdk 的 ES 模块本身确实导出了这个常量 (umd/tinode.dev.js 内部仍以 `const LOCAL_SEQID = 0xFFFFFFF;` 定义并在多处话题方法里使用,只是 没有挂到对外暴露的全局对象上)。externals 映射对"这个键不在对象上"和"这个导出根本不存在"没有 区分,所以按名字导入被静默解析成 `undefined`,没有任何构建报错。撤回菜单项的门控条件 `params.seq > 0 && params.seq < LOCAL_SEQID` 因此变成 `seq < undefined`,在 JS 里恒为 false——不是时间窗口判断错了,是入口条件本身就从未为真过,撤回功能对所有用户、所有消息实质性 完全失效。 用控制台直接调用 MessagesView 实例的 handleShowMessageContextMenu 并打印各分支布尔值定位到 这一步:seq=2 这样明显合法的正整数,seqOk 却是 false,才追到 LOCAL_SEQID 本身是 undefined。 修复:messages-view.jsx 不再从 'tinode-sdk' 导入 LOCAL_SEQID,改为本文件内本地声明 `const LOCAL_SEQID = 0xFFFFFFF`,与 SDK 内部定义保持一致(未改动 webpack externals 映射本身—— 其它页面都依赖它保持现状,改映射风险更大、影响面更广)。 验证:登录测试账号,在群聊里发一条新消息立即长按,确认"撤回"正确出现在菜单中;点击后 `POST /topics/{topic}/messages/{seq}/recall` 返回 200,消息从会话中正确消失;对比一条已经 超过 recall_window_seconds(同时也超过 edit_window_seconds)的旧消息,确认"撤回"和"编辑" 仍正确不显示,时间窗口判断本身未被破坏。 注:umd/index.dev.js 本次未随此提交提交——工作区里并行的其它 agent 仍在改 contact-management-view.jsx / sidepanel-view.jsx 且未提交,重新构建的 index.dev.js 会把它们的 未提交改动一起编译进同一产物文件,为避免混入不相关改动,只提交 messages-view.jsx 按路由懒加载 的独立 chunk(umd/src_views_messages-view_jsx.dev.js 及其 .map),不受这个问题影响。 Co-Authored-By: Claude Sonnet 5 --- src/views/messages-view.jsx | 19 ++++++++++++++++++- umd/src_views_messages-view_jsx.dev.js | 6 +++++- umd/src_views_messages-view_jsx.dev.js.map | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/views/messages-view.jsx b/src/views/messages-view.jsx index 7664e09a..82cf05b7 100644 --- a/src/views/messages-view.jsx +++ b/src/views/messages-view.jsx @@ -3,7 +3,24 @@ import React, { Suspense } from 'react'; import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; -import { Drafty, Tinode, TheCard, LOCAL_SEQID } from 'tinode-sdk'; +import { Drafty, Tinode, TheCard } from 'tinode-sdk'; + +// webpack.config.js maps the 'tinode-sdk' import to the global `tinode` UMD bundle, which only +// re-exports {AccessMode, Drafty, TheCard, Tinode} (see umd/tinode.dev.js's own top-level export +// list) -- LOCAL_SEQID was never one of them, despite tinode-sdk's ES module genuinely exporting +// it (confirmed directly against umd/tinode.dev.js, which still defines it internally as +// `const LOCAL_SEQID = 0xFFFFFFF;` and uses it in several of its own topic methods -- it's just +// never attached to the UMD bundle's exported global object). Importing it by name here silently +// resolved to `undefined` instead of a build error (an externals mapping can't tell "not on this +// object" from "doesn't exist"), and every `seq < LOCAL_SEQID` below was therefore +// `seq < undefined`, which JS always evaluates to false -- confirmed live: "撤回" +// (menu_item_recall)never appeared in the long-press +// menu for ANY message, own or admin, however fresh, because the seq-range check that's supposed +// to just filter out not-yet-confirmed local placeholder messages was unconditionally rejecting +// every real, server-confirmed message too. Hardcoding the same value the SDK itself uses (rather +// than trying to change what webpack's externals map exposes, which every other page importing +// from 'tinode-sdk' already depends on staying exactly as-is) is the narrowest fix. +const LOCAL_SEQID = 0xFFFFFFF; const CallPanel = React.lazy(_ => import('../widgets/call-panel.jsx')); import ChatMessage from '../widgets/chat-message.jsx'; diff --git a/umd/src_views_messages-view_jsx.dev.js b/umd/src_views_messages-view_jsx.dev.js index 3156b82c..99558a90 100644 --- a/umd/src_views_messages-view_jsx.dev.js +++ b/umd/src_views_messages-view_jsx.dev.js @@ -86,6 +86,7 @@ __webpack_require__.r(__webpack_exports__); +const LOCAL_SEQID = 0xFFFFFFF; const CallPanel = react__WEBPACK_IMPORTED_MODULE_0___default().lazy(_ => __webpack_require__.e(/*! import() */ "src_widgets_call-panel_jsx").then(__webpack_require__.bind(__webpack_require__, /*! ../widgets/call-panel.jsx */ "./src/widgets/call-panel.jsx"))); @@ -1040,7 +1041,7 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone menuItems.push('menu_item_copy', 'menu_item_favorite'); const recallWindow = this.state.messagePolicy ? this.state.messagePolicy.recall_window_seconds : 0; const canRecallAsAdmin = topic.isGroupType() && topic.getAccessMode() && topic.getAccessMode().isAdmin(); - if ((params.userFrom == this.props.myUserId || canRecallAsAdmin) && params.seq > 0 && params.seq < tinode_sdk__WEBPACK_IMPORTED_MODULE_2__.LOCAL_SEQID && recallWindow > 0 && params.timestamp && params.timestamp.getTime() > new Date().getTime() - recallWindow * 1000) { + if ((params.userFrom == this.props.myUserId || canRecallAsAdmin) && params.seq > 0 && params.seq < LOCAL_SEQID && recallWindow > 0 && params.timestamp && params.timestamp.getTime() > new Date().getTime() - recallWindow * 1000) { menuItems.push('menu_item_recall'); } if (topic.isSelfType()) { @@ -1379,6 +1380,9 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone }; const urls = Array.from(new Set(urlMatches)); return Promise.all(urls.map(url => (0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_19__.checkURL)(url, 'message_compose'))).then(results => { + if (this.state.topic !== topicForDraft) { + return false; + } const result = results.reduce((worst, r) => (RISK_RANK[r.decision] || 0) > (RISK_RANK[worst.decision] || 0) ? r : worst); if (result.decision === 'allow') { return doSend(); diff --git a/umd/src_views_messages-view_jsx.dev.js.map b/umd/src_views_messages-view_jsx.dev.js.map index 7597c8d7..832960ea 100644 --- a/umd/src_views_messages-view_jsx.dev.js.map +++ b/umd/src_views_messages-view_jsx.dev.js.map @@ -1 +1 @@ -{"version":3,"file":"src_views_messages-view_jsx.dev.js","mappings":";;;;;;;;;;;;;;;;;AAC0B;AAEmB;AAAA;AAE7C,SAAS,IAAI,CAAC;EAAC;AAAQ,CAAC,EAAE;EAAE,OAAO;IAAG,SAAS,EAAC,gBAAgB;IAAC,eAAY,MAAM;IAAA,UAAE;EAAQ,gBAAI,CAAC;AAAE;AAErF,MAAM,QAAQ,SAAS,4DAAmB,CAAC;EACxD,MAAM,GAAG;IACP,OACE;MAAK,EAAE,EAAC,YAAY;MAAA,UAClB;QAAA,WACE;UAAM,EAAE,EAAC,iBAAiB;UAAA,UAAC,8DAAC,IAAI;YAAA,UAAC;UAAK,gBAAM;QAAC,gBAAM,CAAC,EACpD;UAAA,UAAK,qDAAa;QAAA,gBAAK,CAAC,EACxB;UAAA,UAAG;QAAU,gBAAG,CAAC;M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QAAA,eACC;MAAC,gBACP,CAAC,GAAG,IAAI;IAAA,eACZ,CAAC;EAEV;AACF;AAAC;AAED,+DAAe,sDAAU,CAAC,WAAW,CAAC,E","sources":["webpack://tinode-webapp/./src/views/logo-view.jsx","webpack://tinode-webapp/./src/views/messages-view.jsx","webpack://tinode-webapp/./src/widgets/attachment.jsx","webpack://tinode-webapp/./src/widgets/chat-message.jsx","webpack://tinode-webapp/./src/widgets/forward-bundle.jsx","webpack://tinode-webapp/./src/widgets/group-subs.jsx","webpack://tinode-webapp/./src/widgets/invitation.jsx","webpack://tinode-webapp/./src/widgets/meta-message.jsx","webpack://tinode-webapp/./src/widgets/pinned-messages.jsx","webpack://tinode-webapp/./src/widgets/received-marker.jsx","webpack://tinode-webapp/./src/widgets/send-message.jsx"],"sourcesContent":["/* Static placeholder shown in the message pane when no conversation is selected. */\nimport React from 'react';\n\nimport { BASE_APP_NAME } from '../config.js';\n\nfunction Icon({children}) { return {children}; }\n\nexport default class LogoView extends React.PureComponent {\n render() {\n return (\n
\n
\n forum\n

{BASE_APP_NAME}

\n

选择一个会话开始聊天

\n
\n
\n );\n }\n};\n","// Panel with a chat.\n\nimport React, { Suspense } from 'react';\nimport { FormattedMessage, defineMessages, injectIntl } from 'react-intl';\n\nimport { Drafty, Tinode, TheCard, LOCAL_SEQID } from 'tinode-sdk';\n\nconst CallPanel = React.lazy(_ => import('../widgets/call-panel.jsx'));\nimport ChatMessage from '../widgets/chat-message.jsx';\nimport ContactBadges from '../widgets/contact-badges.jsx';\nconst DocPreview = React.lazy(_ => import('../widgets/doc-preview.jsx'));\nimport ErrorPanel from '../widgets/error-panel.jsx';\nimport GroupSubs from '../widgets/group-subs.jsx';\nconst ImagePreview = React.lazy(_ => import('../widgets/image-preview.jsx'));\nimport Invitation from '../widgets/invitation.jsx';\nimport LetterTile from '../widgets/letter-tile.jsx';\nimport LoadSpinner from '../widgets/load-spinner.jsx';\nimport LogoView from './logo-view.jsx';\nimport MetaMessage from '../widgets/meta-message.jsx';\nimport PinnedMessages from '../widgets/pinned-messages.jsx';\nimport { RiskConfirmDialog } from './security-support-view.jsx';\nimport SendMessage from '../widgets/send-message.jsx';\nconst TheCardPreview = React.lazy(_ => import('../widgets/the-card-preview.jsx'));\nconst VideoPreview = React.lazy(_ => import('../widgets/video-preview.jsx'));\n\nimport { DEFAULT_P2P_ACCESS_MODE, EDIT_PREVIEW_LENGTH, IMAGE_PREVIEW_DIM, IMMEDIATE_P2P_SUBSCRIPTION,\n DRAFTY_FR_MIME_TYPE_LEGACY, KEYPRESS_DELAY, MESSAGES_PAGE, MAX_EXTERN_ATTACHMENT_SIZE, MAX_IMAGE_DIM,\n MAX_INBAND_ATTACHMENT_SIZE, READ_DELAY, QUOTED_REPLY_LENGTH, VIDEO_PREVIEW_DIM } from '../config.js';\nimport { CALL_STATE_OUTGOING_INITATED, CALL_STATE_IN_PROGRESS } from '../constants.js';\nimport { blobToBase64, fileToBase64, imageScaled, importVCard, makeImageUrl } from '../lib/blob-helpers.js';\nimport { topicDisplayName } from '../lib/utils.js';\nimport { acceptGroupInvitation, checkURL, confirmRiskChallenge, createChatUploader, favoriteMessages, getBootstrap,\n getConversationContext, getFavorites, getGroupJoinRequests, getGroupMembers, getLatestGroupAnnouncement,\n getTopicDraft, recallMessage, updateTopicDraft } from '../lib/im-api.js';\nimport HashNavigation from '../lib/navigation.js';\nimport { bytesToHumanSize, relativeDateFormat, shortDateFormat } from '../lib/strformat.js';\n\n// Run timer with this frequency (ms) for checking notification queue.\nconst NOTIFICATION_EXEC_INTERVAL = 300;\n// Scroll distance before [go to latest message] button is shown.\nconst SHOW_GO_TO_LAST_DIST = 100;\n// Sctoll distance from the top when fetching the page of earlier messages is triggered.\nconst FETCH_PAGE_TRIGGER = 40;\n\nconst messages = defineMessages({\n // 已存在于 src/i18n/*.json(zh: \"消息已删除\"),这里只是注册引用,不是新增待翻译串\n message_deleted: {\n id: 'message_deleted',\n defaultMessage: 'message deleted',\n description: 'Placeholder shown in the timeline where a message was recalled or deleted',\n },\n online_now: {\n id: 'online_now',\n defaultMessage: 'online now',\n description: 'Indicator that the user or topic is currently online',\n },\n last_seen: {\n id: 'last_seen_timestamp',\n defaultMessage: 'Last seen: {timestamp}',\n description: 'Label for the timestamp of when the user or topic was last online'\n },\n not_found: {\n id: 'title_not_found',\n defaultMessage: 'Not found',\n description: 'Title shown when topic is not found'\n },\n channel: {\n id: 'channel',\n defaultMessage: 'channel',\n description: 'Subtitle shown for channels in MessagesView instead of last seen'\n },\n file_attachment_too_large: {\n id: 'file_attachment_too_large',\n defaultMessage: 'The file size {size} exceeds the {limit} limit.',\n description: 'Error message when attachment is too large'\n },\n invalid_content: {\n id: 'invalid_content',\n defaultMessage: 'invalid content',\n description: 'Shown when the message is unreadable'\n },\n editing_message: {\n id: 'editing_message',\n defaultMessage: 'Editing',\n description: 'Title over message editing preview'\n },\n drag_file: {\n id: 'drag_file',\n defaultMessage: 'Drag file here',\n description: 'Prompt on the file drag-n-drop overlay banner'\n },\n self_topic_name: {\n id: 'self_topic_name',\n defaultMessage: 'Saved messages',\n description: 'Name of self topic for UI'\n },\n subscriber_count: {\n id: 'subscriber_count',\n defaultMessage: '{count, plural, ' +\n 'one {{count, number} subscriber} ' +\n 'two {{count, number} subscribers} ' +\n 'three {{count, number} subscribers} ' +\n 'few {{count, number} subscribers} ' +\n 'many {{count, number} subscribers} ' +\n 'other {{count, number} subscribers}}',\n description: 'Count of channel subscribers'\n },\n member_count: {\n id: 'member_count',\n defaultMessage: '{count, plural, ' +\n 'one {{count, number} member} ' +\n 'two {{count, number} members} ' +\n 'three {{count, number} members} ' +\n 'few {{count, number} members} ' +\n 'many {{count, number} members} ' +\n 'other {{count, number} members}}',\n description: 'Count of group topic members'\n },\n cannot_parse_vcard: {\n id: 'cannot_parse_vcard',\n defaultMessage: 'Cannot parse vCard file.',\n description: 'Error message when vCard file cannot be parsed'\n }\n});\n\n// Checks if the access permissions are granted but not yet accepted.\nfunction isUnconfirmed(acs) {\n if (acs) {\n const ex = acs.getExcessive() || '';\n return acs.isJoiner('given') && (ex.includes('R') || ex.includes('W'));\n }\n return false;\n}\n\nfunction isPeerRestricted(acs) {\n if (acs) {\n const ms = acs.getMissing() || '';\n return acs.isJoiner('want') && (ms.includes('R') || ms.includes('W'));\n }\n return false;\n}\n\n// Synthetic \"所有人\" entry in the @提醒 picker (mentionSearch below) -- not a real user_id, just a\n// marker mentionSelected/sendMessage recognize to set head.mention_all instead of resolving a\n// Drafty MN entity to it. Never sent to the server as an actual id.\nconst MENTION_ALL_UID = '__mention_all__';\n\nfunction shouldPresentCallPanel(callState) {\n // Show call panel if either:\n // - call is outgoing (and the client is waiting for the other side to pick up) or,\n // - call is already in progress.\n return callState == CALL_STATE_OUTGOING_INITATED || callState == CALL_STATE_IN_PROGRESS;\n}\n\nclass MessagesView extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = MessagesView.getDerivedStateFromProps(props, {});\n // Not topic-specific, fetched once in componentDidMount -- unlike the rest of state this\n // is intentionally not touched by getDerivedStateFromProps on topic change.\n this.state.messagePolicy = null;\n this.state.toast = null;\n this.state.riskDialog = null;\n this.mentionedUsers = [];\n this.mentionAllPending = false;\n\n this.componentSetup = this.componentSetup.bind(this);\n this.leave = this.leave.bind(this);\n this.sendMessage = this.sendMessage.bind(this);\n this.handleRiskConfirm = this.handleRiskConfirm.bind(this);\n this.handleRiskCancel = this.handleRiskCancel.bind(this);\n this.retrySend = this.retrySend.bind(this);\n this.sendImageAttachment = this.sendImageAttachment.bind(this);\n this.sendVideoAttachment = this.sendVideoAttachment.bind(this);\n this.sendFileAttachment = this.sendFileAttachment.bind(this);\n this.sendAudioAttachment = this.sendAudioAttachment.bind(this);\n this.sendTheCardAttachment = this.sendTheCardAttachment.bind(this);\n this.sendKeyPress = this.sendKeyPress.bind(this);\n this.subscribe = this.subscribe.bind(this);\n this.handleScrollReference = this.handleScrollReference.bind(this);\n this.mountDnDEvents = this.mountDnDEvents.bind(this);\n this.handleScrollEvent = this.handleScrollEvent.bind(this);\n this.handleDescChange = this.handleDescChange.bind(this);\n this.handleSubsUpdated = this.handleSubsUpdated.bind(this);\n this.handleMessageUpdate = this.handleMessageUpdate.bind(this);\n this.handleAuxUpdate = this.handleAuxUpdate.bind(this);\n this.handleAllMessagesReceived = this.handleAllMessagesReceived.bind(this);\n this.handleInfoReceipt = this.handleInfoReceipt.bind(this);\n this.handleExpandMedia = this.handleExpandMedia.bind(this);\n this.handleClosePreview = this.handleClosePreview.bind(this);\n this.handleCallPanelToggle = this.handleCallPanelToggle.bind(this);\n this.handleFormResponse = this.handleFormResponse.bind(this);\n this.handleContextClick = this.handleContextClick.bind(this);\n this.handleShowMessageContextMenu = this.handleShowMessageContextMenu.bind(this);\n this.handleNewChatAcceptance = this.handleNewChatAcceptance.bind(this);\n this.handleEnablePeer = this.handleEnablePeer.bind(this);\n this.loadRelationshipContext = this.loadRelationshipContext.bind(this);\n this.loadGroupContext = this.loadGroupContext.bind(this);\n this.loadDraft = this.loadDraft.bind(this);\n this.handleComposerChange = this.handleComposerChange.bind(this);\n this.clearDraft = this.clearDraft.bind(this);\n this.mentionSearch = this.mentionSearch.bind(this);\n this.mentionSelected = this.mentionSelected.bind(this);\n this.handleShowAnnouncement = this.handleShowAnnouncement.bind(this);\n this.handleShowJoinRequests = this.handleShowJoinRequests.bind(this);\n this.handleSendFriendVerification = this.handleSendFriendVerification.bind(this);\n this.handleAcceptGroupInvitation = this.handleAcceptGroupInvitation.bind(this);\n this.handleBatchDelete = this.handleBatchDelete.bind(this);\n this.handleBatchFavorite = this.handleBatchFavorite.bind(this);\n this.handleAttachFile = this.handleAttachFile.bind(this);\n this.handleAttachImageOrVideo = this.handleAttachImageOrVideo.bind(this);\n this.handleCancelUpload = this.handleCancelUpload.bind(this);\n this.postReadNotification = this.postReadNotification.bind(this);\n this.clearNotificationQueue = this.clearNotificationQueue.bind(this);\n this.goToLatestMessage = this.goToLatestMessage.bind(this);\n this.handleFileDrop = this.handleFileDrop.bind(this);\n\n this.handlePickReply = this.handlePickReply.bind(this);\n this.handleEditMessage = this.handleEditMessage.bind(this);\n this.handleCancelReply = this.handleCancelReply.bind(this);\n this.handleQuoteClick = this.handleQuoteClick.bind(this);\n this.jumpToMessage = this.jumpToMessage.bind(this);\n this.handleUnpinMessage = this.handleUnpinMessage.bind(this);\n this.handleCallHangup = this.handleCallHangup.bind(this);\n\n this.isDragEnabled = this.isDragEnabled.bind(this);\n this.handleDragStart = this.handleDragStart.bind(this);\n this.handleDragIn = this.handleDragIn.bind(this);\n this.handleDragOut = this.handleDragOut.bind(this);\n this.handleDrag = this.handleDrag.bind(this);\n this.handleDrop = this.handleDrop.bind(this);\n\n this.chatMessageRefs = [];\n this.getOrCreateMessageRef = this.getOrCreateMessageRef.bind(this);\n this.getVisibleMessageRange = this.getVisibleMessageRange.bind(this);\n\n // Keeps track of the drag event.\n // Need a counter b/c the browser's 'drag' events may fire multiple times\n // when the user takes the mouse pointer over the container:\n // for the component itself and for all nested/child elements.\n this.dragCounter = 0;\n this.dndRef = null;\n\n this.readNotificationQueue = [];\n this.readNotificationTimer = null;\n\n this.keyPressTimer = null;\n }\n\n getOrCreateMessageRef(seqId) {\n if (this.chatMessageRefs[seqId]) {\n return this.chatMessageRefs[seqId];\n }\n const ref = React.createRef();\n this.chatMessageRefs[seqId] = ref;\n return ref;\n }\n\n getVisibleMessageRange(holderRect) {\n let min = Number.MAX_SAFE_INTEGER, max = -1;\n let visibilityStatus = false;\n this.chatMessageRefs.every((ref, seq) => {\n if (ref.current) {\n const { top, bottom, height } = ref.current.getBoundingClientRect();\n const visible = top <= holderRect.top ? holderRect.top - top <= height : bottom - holderRect.bottom <= height;\n if (visible) {\n visibilityStatus = true;\n min = Math.min(min, seq);\n max = Math.max(max, seq);\n } else if (visibilityStatus) {\n // The remaining elements are no longer visible, no need to iterate them.\n return false;\n }\n }\n return true;\n });\n\n return max >= min ? {min: min, max: max} : {min: 0, max: 0};\n }\n\n componentDidMount() {\n if (this.messagesScroller) {\n this.messagesScroller.addEventListener('scroll', this.handleScrollEvent);\n }\n\n // Drag and drop events\n this.mountDnDEvents(this.dndRef);\n\n this.componentSetup({}, {});\n\n // Ch.7: jump to a message found via chat-history search/media grid (content-library-view.jsx's\n // History) -- the componentDidUpdate check a few lines below only fires on a *change* to\n // jumpToSeq while this component stays mounted, but tinode-web.jsx never renders MessagesView\n // and a Ch.7 side panel at the same time (`!chapterSevenActive` gates it) -- every jump from\n // History's search results/image grid/video grid therefore unmounts the Ch.7 view and mounts a\n // *brand new* MessagesView instance with jumpToSeq already set on its very first render, which\n // componentDidUpdate never sees (it doesn't run for the initial mount). Confirmed live: the\n // seq stayed in the URL indefinitely (jumpToMessage's own `removeUrlParam` call never fired)\n // and the conversation opened at the bottom instead of scrolling to the found message --\n // 100% reproducible for every Ch.7 \"定位到消息来源\" entry point, not an intermittent timing issue.\n if (this.props.jumpToSeq) {\n const seq = parseInt(this.props.jumpToSeq, 10);\n const topicObj = this.props.tinode && this.props.topic ? this.props.tinode.getTopic(this.props.topic) : null;\n const attemptJump = () => this.jumpToMessage(seq);\n // A first-ever mount also means `componentSetup()` just above only *started* subscribing\n // this topic (subscribe() -> topic.subscribe() is async, fire-and-forget from here) --\n // jumpToMessage's own topic.getMeta() call requires an already-established subscription,\n // and firing immediately races ahead of it: confirmed live, this raced getMeta() call came\n // back as a real `{\"code\":403,\"text\":\"permission denied\"}` control message (not a local\n // guard, an actual rejected server round trip) while the real subscribe's own request was\n // still in flight one id apart. Poll the already-exposed isSubscribed() flag rather than\n // guessing a fixed delay or reworking subscribe()'s fire-and-forget call sites to expose\n // their promise; capped at 5s so a genuinely stuck subscribe still falls through to\n // jumpToMessage's own existing error handling instead of waiting forever.\n if (topicObj && !topicObj.isSubscribed()) {\n let tries = 0;\n const waitForSubscription = () => {\n if (topicObj.isSubscribed() || ++tries > 25) {\n attemptJump();\n } else {\n window.setTimeout(waitForSubscription, 200);\n }\n };\n waitForSubscription();\n } else {\n attemptJump();\n }\n }\n\n getBootstrap().then(data => {\n this.setState({messagePolicy: data.message_policy || null});\n }).catch(_ => {});\n }\n\n componentWillUnmount() {\n // componentSetup below has an identical guard for switching from one topic to another during an\n // active call -- but componentDidUpdate/componentSetup never runs on an actual unmount (leaving\n // the messaging section entirely for another chapter, or on mobile switching to the conversation\n // list while displayMobile). Without this, CallPanel's own componentWillUnmount only tears down\n // local media: it never notifies the peer or resets tinode-web.jsx's top-level callState/\n // callTopic, which then stay stuck at CALL_STATE_IN_PROGRESS. Navigating back to the call's topic\n // later remounts a \"zombie\" CallPanel -- its start() sees that stale CALL_STATE_IN_PROGRESS and\n // takes the \"we just accepted\" branch, which never calls getUserMedia(): no local media, every\n // control disabled, only hang-up works.\n if (this.state.rtcPanel) {\n this.handleCallHangup(this.state.topic, this.props.callSeq);\n }\n if (this.messagesScroller) {\n this.messagesScroller.removeEventListener('scroll', this.handleScrollEvent);\n }\n window.clearTimeout(this.toastTimer);\n\n // Flush all notifications.\n this.clearNotificationQueue();\n\n // Drag and drop events\n if (this.dndRef) {\n this.dndRef.removeEventListener('dragstart', this.handleDragStart);\n this.dndRef.removeEventListener('dragenter', this.handleDragIn);\n this.dndRef.removeEventListener('dragleave', this.handleDragOut);\n this.dndRef.removeEventListener('dragover', this.handleDrag);\n this.dndRef.removeEventListener('drop', this.handleDrop);\n }\n }\n\n componentDidUpdate(prevProps, prevState) {\n // Scroll last message into view on component update e.g. on message received\n // or vertical shrinking.\n if (this.messagesScroller &&\n (prevState.topic != this.state.topic || prevState.maxSeqId != this.state.maxSeqId ||\n prevState.minSeqId != this.state.minSeqId)) {\n // New message.\n if (this.state.scrollPosition < SHOW_GO_TO_LAST_DIST) {\n this.messagesScroller.scrollTop = this.messagesScroller.scrollHeight -\n this.state.scrollPosition - this.messagesScroller.offsetHeight;\n }\n }\n\n if (!this.props.applicationVisible) {\n // If application is not visible, flush all unsent 'read' notifications.\n this.clearNotificationQueue();\n } else {\n // Otherwise assume there are unread messages.\n this.postReadNotification(0);\n }\n\n // Ch.7: jump to a message found via chat-history search (content-library-view.jsx's History),\n // passed in as a ?jumpseq= hash param rather than a normal prop since the navigation that gets us\n // here also has to change the *topic*, which content-library-view.jsx has no direct way to do.\n if (this.props.jumpToSeq && this.props.jumpToSeq != prevProps.jumpToSeq) {\n this.jumpToMessage(parseInt(this.props.jumpToSeq, 10));\n }\n\n this.componentSetup(prevProps, prevState);\n }\n\n componentSetup(prevProps, prevState) {\n const topic = this.props.tinode ? this.props.tinode.getTopic(this.state.topic) : undefined;\n if (this.state.topic != prevState.topic) {\n if (prevState.topic && !Tinode.isNewGroupTopicName(prevState.topic)) {\n this.leave(prevState.topic);\n if (prevState.rtcPanel) {\n this.handleCallHangup(prevState.topic, prevProps.callSeq);\n }\n }\n\n if (topic) {\n topic.onData = this.handleMessageUpdate;\n topic.onAllMessagesReceived = this.handleAllMessagesReceived;\n topic.onInfo = this.handleInfoReceipt;\n topic.onMetaDesc = this.handleDescChange;\n topic.onSubsUpdated = this.handleSubsUpdated;\n topic.onPres = this.handleSubsUpdated;\n topic.onAuxUpdated = this.handleAuxUpdate;\n }\n\n this.mentionedUsers = [];\n this.mentionAllPending = false;\n this.loadRelationshipContext(topic);\n this.loadGroupContext(topic);\n this.loadDraft(topic);\n }\n\n if (topic) {\n if ((this.state.topic != prevState.topic) || (this.props.myUserId && !prevProps.myUserId)) {\n // Don't immediately subscribe to a new p2p topic, wait for the first message.\n const newTopic = (this.props.newTopicParams && this.props.newTopicParams._topicName == this.props.topic);\n if (topic.isP2PType() && newTopic && !IMMEDIATE_P2P_SUBSCRIPTION) {\n topic.getMeta(topic.startMetaQuery().withDesc().build());\n } else if (this.props.myUserId) {\n this.subscribe(topic);\n }\n } else if (topic.isSubscribed() && this.state.isReader && !prevState.isReader) {\n // If reader status has changed and data became available.\n topic.getMeta(topic.startMetaQuery().withLaterData().build());\n } else if (!topic.isSubscribed() && this.props.ready && !prevProps.ready) {\n // Connection restored (e.g. wake from sleep): resubscribe to the currently open topic.\n this.subscribe(topic);\n }\n }\n }\n\n static getDerivedStateFromProps(nextProps, prevState) {\n let nextState = {};\n if (!nextProps.topic) {\n // Default state: no topic.\n nextState = {\n minSeqId: -1,\n maxSeqId: -1,\n latestClearId: -1,\n onlineSubs: [],\n topic: null,\n title: '',\n avatar: null,\n isVerified: false,\n isStaff: false,\n isDangerous: false,\n deleted: false,\n docPreview: null,\n imagePreview: null,\n imagePostview: null,\n videoPreview: null,\n videoPostview: null,\n rtcPanel: null,\n minimizedCallPanel: false,\n typingIndicator: false,\n scrollPosition: 0,\n fetchingMessages: false,\n peerMessagingDisabled: false,\n channel: false,\n reply: null,\n contentToEdit: null,\n showGoToLastButton: false,\n dragging: false,\n pins: [],\n pinsLoaded: false,\n selectedPin: 0,\n subsVersion: 0,\n relationshipContext: null,\n groupRoles: null,\n myGroupRole: null,\n groupAnnouncement: null,\n pendingJoinRequests: 0,\n draftText: null,\n draftVersion: 0\n };\n } else if (nextProps.topic != prevState.topic) {\n const topic = nextProps.tinode.getTopic(nextProps.topic);\n\n nextState = {\n topic: nextProps.topic,\n deleted: topic._deleted,\n docPreview: null,\n imagePreview: null,\n imagePostview: null,\n videoPreview: null,\n videoPostview: null,\n rtcPanel: null,\n minimizedCallPanel: false,\n typingIndicator: false,\n scrollPosition: 0,\n fetchingMessages: false,\n showGoToLastButton: false,\n contentToEdit: null,\n dragging: false,\n selectedPin: 0,\n relationshipContext: null,\n groupRoles: null,\n myGroupRole: null,\n groupAnnouncement: null,\n pendingJoinRequests: 0,\n draftText: null,\n draftVersion: 0,\n // MessagesView isn't remounted on topic switch (no `key={topic}` at the call site in\n // tinode-web.jsx), so a pending risk-check dialog from the conversation just left would\n // otherwise survive the switch -- confirming it would then send the old topic's message\n // into whichever topic is now open, since doSend()'s `this.props.sendMessage` resolves the\n // topic to send to at call time, not at the time the dialog was raised.\n riskDialog: null\n };\n\n if (nextProps.forwardMessage) {\n if (nextProps.forwardMessage.content) {\n const content = nextProps.forwardMessage.content;\n const size = content?.length || (content?.size || 0);\n nextState.docPreview = {\n object: content,\n type: nextProps.forwardMessage.type,\n size: size\n };\n } else {\n // We are forwarding a message. Show preview.\n nextState.reply = {\n content: nextProps.forwardMessage.preview,\n seq: null\n };\n }\n } else {\n nextState.reply = null;\n }\n\n if (topic) {\n // Topic exists.\n const subs = [];\n\n if (nextProps.connected) {\n topic.subscribers((sub) => {\n if (sub.online && sub.user != nextProps.myUserId) {\n subs.push(sub);\n }\n });\n }\n\n Object.assign(nextState, {\n onlineSubs: subs\n });\n\n if (topic.isSelfType()) {\n Object.assign(nextState, {\n title: nextProps.intl.formatMessage(messages.self_topic_name),\n avatar: true\n });\n } else if (topic.public) {\n Object.assign(nextState, {\n title: topicDisplayName(topic.name, topic.public, ''),\n avatar: makeImageUrl(topic.public.photo)\n });\n } else {\n Object.assign(nextState, {\n title: '',\n avatar: null\n });\n }\n\n const peer = topic.p2pPeerDesc();\n if (peer) {\n Object.assign(nextState, {\n peerMessagingDisabled: isPeerRestricted(peer.acs)\n });\n } else if (prevState.peerMessagingDisabled) {\n Object.assign(nextState, {\n peerMessagingDisabled: false\n });\n }\n Object.assign(nextState, {\n minSeqId: topic.minMsgSeq(),\n maxSeqId: topic.maxMsgSeq(),\n latestClearId: topic.maxClearId(),\n channel: topic.isChannelType(),\n pins: (topic.aux('pins') || []).slice(),\n pinsLoaded: false\n });\n\n if (nextProps.callTopic == topic.name && shouldPresentCallPanel(nextProps.callState)) {\n nextState.rtcPanel = nextProps.callTopic;\n }\n } else {\n // Invalid topic.\n Object.assign(nextState, {\n minSeqId: -1,\n maxSeqId: -1,\n latestClearId: -1,\n onlineSubs: [],\n title: '',\n avatar: null,\n peerMessagingDisabled: false,\n channel: false,\n pins: [],\n pinsLoaded: false\n });\n }\n } else {\n // We are still in same topic. Show the call panel if necessary.\n if (nextProps.callTopic == prevState.topic && !prevState.rtcPanel &&\n shouldPresentCallPanel(nextProps.callState)) {\n nextState.rtcPanel = nextProps.callTopic;\n }\n }\n\n if (nextProps.acs) {\n if (nextProps.acs.isWriter() != prevState.isWriter) {\n nextState.isWriter = !prevState.isWriter;\n }\n if (nextProps.acs.isReader() != prevState.isReader) {\n nextState.isReader = !prevState.isReader;\n }\n if (nextProps.acs.isAdmin() != prevState.isAdmin) {\n nextState.isAdmin = !prevState.isAdmin;\n }\n if (!nextProps.acs.isReader('given') != prevState.readingBlocked) {\n nextState.readingBlocked = !prevState.readingBlocked;\n }\n if (nextProps.acs.isSharer() != prevState.isSharer) {\n nextState.isSharer = !prevState.isSharer;\n }\n } else {\n if (prevState.isWriter) {\n nextState.isWriter = false;\n }\n if (prevState.isReader) {\n nextState.isReader = false;\n }\n if (prevState.isAdmin) {\n nextState.isAdmin = false;\n }\n if (!prevState.readingBlocked) {\n nextState.readingBlocked = true;\n }\n if (prevState.isSharer) {\n nextState.isSharer = false;\n }\n }\n\n if (isUnconfirmed(nextProps.acs) == !prevState.unconformed) {\n nextState.unconfirmed = !prevState.unconformed;\n }\n\n // Clear subscribers online when there is no connection.\n if (!nextProps.connected && prevState.onlineSubs && prevState.onlineSubs.length > 0) {\n nextState.onlineSubs = [];\n }\n\n return nextState;\n }\n\n subscribe(topic) {\n if (!this.props.ready) {\n return;\n }\n\n // Is this a new topic?\n const newTopic = (this.props.newTopicParams && this.props.newTopicParams._topicName == this.props.topic);\n // Don't request the tags. They are useless unless the user\n // is the owner and is editing the topic.\n let getQuery = topic.startMetaQuery().withLaterDesc().withLaterSub().withAux();\n if (this.state.isReader || newTopic) {\n // Reading is either permitted or we don't know because it's a new topic. Ask for messages.\n //\n // withData(undefined, undefined, MESSAGES_PAGE) instead of the seemingly-more-natural\n // withLaterData(MESSAGES_PAGE): the latter asks the server for \"whatever is newer than\n // topic._maxSeq\", which is only correct when _maxSeq reflects a real, contiguous, locally-cached\n // history. But tinode-web.jsx's prefetchLatestMessagePreviews() (conversation list \"last\n // message\" preview) may have already called topic.subscribe(startMetaQuery().withLaterData(1))\n // for this exact topic the moment the chat list rendered -- often *before* this view ever mounts,\n // e.g. the very first time a brand-new conversation is opened in a fresh session -- which sets\n // _maxSeq to that one prefetched message's seq without caching anything before it. From that\n // point on withLaterData(MESSAGES_PAGE) asks for \"later than the one message I already have\" and\n // gets back nothing: confirmed live, a brand-new 4-message P2P conversation opened this way\n // rendered only the single latest message, silently missing the rest of the history.\n // withData(undefined, undefined, limit) has no such since-cursor -- it always asks for \"the\n // latest `limit` messages\" regardless of what the client thinks it already has, which is\n // correct both in this poisoned-prefetch case and in the plain fresh-topic case (there\n // topic._maxSeq is 0, so withLaterData(limit) already degrades to the exact same\n // since:undefined query -- this is a strict fix, not a behavior change for the common path).\n getQuery = getQuery.withData(undefined, undefined, MESSAGES_PAGE);\n if (this.state.isReader) {\n getQuery = getQuery.withLaterDel();\n }\n // And show \"loading\" spinner.\n this.setState({ fetchingMessages: true });\n }\n\n const setQuery = newTopic ? this.props.newTopicParams : undefined;\n const doSubscribe = () => topic.subscribe(getQuery.build(), setQuery)\n .then(ctrl => {\n if (ctrl.code == 303) {\n // Redirect to another topic requested.\n HashNavigation.navigateTo(HashNavigation.setUrlTopic('', ctrl.params.topic));\n return;\n }\n if (this.state.topic != ctrl.topic) {\n this.setState({topic: ctrl.topic});\n }\n if (this.state.deleted) {\n this.setState({deleted: false});\n }\n this.props.onNewTopicCreated(this.props.topic, ctrl.topic);\n // If there are unsent messages (except hard-failed and video call messages),\n // try sending them now. Hard-failed and unsent video call messages will be dropped.\n let discard = [];\n topic.queuedMessages(pub => {\n if (pub._sending) {\n return;\n }\n if (pub._fatal || (pub.head && pub.head.webrtc)) {\n // Filter out unsent failed & video call messages.\n discard.push(pub.seq);\n return;\n }\n if (topic.isSubscribed()) {\n this.retrySend(pub);\n }\n });\n if (discard.length > 0) {\n topic.delMessagesList(discard, true);\n }\n })\n .catch(err => {\n console.error(\"Failed subscription to\", this.state.topic, err);\n this.props.onError(err.message, 'err');\n const blankState = MessagesView.getDerivedStateFromProps({}, {});\n blankState.title = this.props.intl.formatMessage(messages.not_found);\n this.setState(blankState);\n });\n\n if (topic.isSubscribed()) {\n // Same prefetch race as the comment on the data query above: the topic may already be\n // \"attached\" server-side from prefetchLatestMessagePreviews' single-message subscribe, before\n // this view ever asked for anything. The SDK's own Topic.subscribe() unconditionally\n // short-circuits to `Promise.resolve(this)` once `_attached` is true (tinode.dev.js)\n // *without even looking at the getParams passed in* -- calling topic.subscribe(getQuery...)\n // directly in that state would silently no-op and this view would never receive the real\n // history/pinned-messages/peer read-receipts it just asked for. leave(false) clears _attached\n // (both client-side via _resetSub() and server-side, since it's a real round trip) without\n // discarding already-cached messages (that only happens for leave(true), i.e. unsubscribe) --\n // once it resolves, the follow-up doSubscribe() is guaranteed to be a genuine, un-shortcut\n // subscribe that gets the server to actually answer getQuery instead of silently dropping it.\n topic.leave(false).catch(_ => { /* best-effort; doSubscribe() below still needs to run */ }).then(doSubscribe);\n return;\n }\n\n doSubscribe();\n }\n\n leave(oldTopicName) {\n if (!oldTopicName || !this.props.tinode.isTopicCached(oldTopicName)) {\n return;\n }\n\n const oldTopic = this.props.tinode.getTopic(oldTopicName);\n if (oldTopic && oldTopic.isSubscribed()) {\n oldTopic.leave(false)\n .catch(_ => { /* do nothing here */ })\n .finally(_ => {\n // We don't care if the request succeeded or failed.\n // The topic is dead regardless.\n this.setState({fetchingMessages: false});\n oldTopic.onData = undefined;\n oldTopic.onAllMessagesReceived = undefined;\n oldTopic.onInfo = undefined;\n oldTopic.onMetaDesc = undefined;\n oldTopic.onSubsUpdated = undefined;\n oldTopic.onPres = undefined;\n oldTopic.onAuxUpdated = undefined;\n });\n }\n }\n\n // Don't use React.createRef as the ref.current is not available in componentDidMount in this component.\n handleScrollReference(node) {\n if (node) {\n node.addEventListener('scroll', this.handleScrollEvent);\n this.messagesScroller = node;\n this.messagesScroller.scrollTop = this.messagesScroller.scrollHeight -\n this.state.scrollPosition - this.messagesScroller.offsetHeight;\n }\n }\n\n // Get older messages and show/hide [go to latest message] button.\n handleScrollEvent(event) {\n const pos = event.target.scrollHeight - event.target.scrollTop - event.target.offsetHeight;\n this.setState({\n scrollPosition: pos,\n // Show [go to latest message] if far enough from bottom and scrolling down.\n showGoToLastButton: (pos > SHOW_GO_TO_LAST_DIST) && (pos < this.state.scrollPosition),\n });\n\n if (this.state.fetchingMessages || this.processingScrollEvent) {\n return;\n }\n\n if (event.target.scrollTop <= FETCH_PAGE_TRIGGER) {\n const topic = this.props.tinode.getTopic(this.state.topic);\n if (topic && topic.isSubscribed()) {\n this.processingScrollEvent = true;\n const {min, max} = this.getVisibleMessageRange(event.target.getBoundingClientRect());\n const gaps = topic.msgHasMoreMessages(min, max, false);\n if (gaps.length > 0) {\n this.setState({fetchingMessages: true}, _ => {\n topic.getMessagesPage(MESSAGES_PAGE, gaps, min, max)\n .catch(err => this.props.onError(err.message, 'err'))\n .finally(_ => this.setState({fetchingMessages: false}));\n });\n }\n }\n }\n this.processingScrollEvent = false;\n }\n\n /* Mount drag and drop events */\n mountDnDEvents(dnd) {\n if (dnd) {\n dnd.addEventListener('dragstart', this.handleDragStart);\n dnd.addEventListener('dragenter', this.handleDragIn);\n dnd.addEventListener('dragleave', this.handleDragOut);\n dnd.addEventListener('dragover', this.handleDrag);\n dnd.addEventListener('drop', this.handleDrop);\n this.dndRef = dnd;\n }\n }\n\n goToLatestMessage() {\n this.setState({scrollPosition: 0});\n if (this.messagesScroller) {\n this.messagesScroller.scrollTop = this.messagesScroller.scrollHeight - this.messagesScroller.offsetHeight;\n }\n }\n\n handleDescChange(desc) {\n if (Tinode.isSelfTopicName(this.props.topic)) {\n this.setState({\n title: this.props.intl.formatMessage(messages.self_topic_name),\n avatar: true\n });\n } else if (desc.public) {\n this.setState({\n title: topicDisplayName(this.props.topic, desc.public, ''),\n avatar: makeImageUrl(desc.public.photo)\n });\n } else {\n this.setState({\n title: '',\n avatar: null\n });\n }\n\n if (desc.acs) {\n this.setState({\n isWriter: desc.acs.isWriter(),\n isReader: desc.acs.isReader(),\n isAdmin: desc.acs.isAdmin(),\n readingBlocked: !desc.acs.isReader('given'),\n unconfirmed: isUnconfirmed(desc.acs),\n });\n }\n }\n\n postReadNotification(seq) {\n // Ignore notifications if the app is invisible or topic is not yet available.\n if (!this.props.applicationVisible || !this.state.topic) {\n return;\n }\n\n // Set up the timer if it's not running already.\n if (!this.readNotificationTimer) {\n this.readNotificationTimer = setInterval(_ => {\n if (this.readNotificationQueue.length == 0) {\n // Shut down the timer if the queue is empty.\n clearInterval(this.readNotificationTimer);\n this.readNotificationTimer = null;\n return;\n }\n\n let seq = -1;\n while (this.readNotificationQueue.length > 0) {\n const n = this.readNotificationQueue[0];\n if (n.topicName != this.state.topic) {\n // Topic has changed. Drop the notification.\n this.readNotificationQueue.shift();\n continue;\n }\n\n const now = new Date();\n if (n.sendAt <= now) {\n // Remove expired notification from queue.\n this.readNotificationQueue.shift();\n if (n.seq == 0 || Tinode.isServerAssignedSeq(n.seq)) {\n seq = Math.max(seq, n.seq);\n }\n } else {\n break;\n }\n }\n\n // Send only one notification for the whole batch of messages.\n if (seq >= 0) {\n const topic = this.props.tinode.getTopic(this.state.topic);\n if (topic) {\n try {\n topic.noteRead(seq);\n } catch (err) {\n console.error(\"Failed to send read notification\", err);\n }\n }\n }\n }, NOTIFICATION_EXEC_INTERVAL);\n }\n\n const now = new Date();\n this.readNotificationQueue.push({\n topicName: this.state.topic,\n seq: seq,\n sendAt: now.setMilliseconds(now.getMilliseconds() + READ_DELAY)\n });\n }\n\n // Clear notification queue and timer.\n clearNotificationQueue() {\n this.readNotificationQueue = [];\n if (this.readNotificationTimer) {\n clearInterval(this.readNotificationTimer);\n this.readNotificationTimer = null;\n }\n }\n\n handleSubsUpdated() {\n if (this.state.topic) {\n const subs = [];\n const topic = this.props.tinode.getTopic(this.state.topic);\n topic.subscribers(sub => {\n if (sub.online && sub.user != this.props.myUserId) {\n subs.push(sub);\n }\n });\n const newState = {onlineSubs: subs, subsVersion: this.state.subsVersion + 1};\n const peer = topic.p2pPeerDesc();\n if (peer) {\n Object.assign(newState, {\n peerMessagingDisabled: isPeerRestricted(peer.acs)\n });\n } else if (this.state.peerMessagingDisabled) {\n Object.assign(newState, {\n peerMessagingDisabled: false\n });\n }\n this.setState(newState);\n }\n }\n\n // The 'msg' could be false-ish if some message ranges were deleted.\n handleMessageUpdate(msg) {\n if (!this.state.topic) {\n return;\n }\n const topic = this.props.tinode.getTopic(this.state.topic);\n if (!msg) {\n // msg could be null if one or more messages were deleted.\n // Updating state to force redraw.\n this.setState({latestClearId: topic.maxClearId()});\n return;\n }\n\n clearTimeout(this.keyPressTimer)\n this.setState({maxSeqId: topic.maxMsgSeq(), minSeqId: topic.minMsgSeq(), typingIndicator: false}, _ => {\n // Scroll to the bottom if the message is added to the end of the message\n // list if already at the bottom, otherwise show [go to latest] button.\n // Implemented as a callback to be sure the scroll height has been updated.\n if (topic.isNewMessage(msg.seq)) {\n if (this.state.scrollPosition > SHOW_GO_TO_LAST_DIST) {\n this.setState({showGoToLastButton: true});\n } else {\n this.goToLatestMessage();\n }\n } else {\n if (this.messagesScroller) {\n this.messagesScroller.scrollTop = this.messagesScroller.scrollHeight - this.state.scrollPosition -\n this.messagesScroller.offsetHeight;\n }\n }\n });\n\n // Aknowledge messages except own messages. They are\n // automatically assumed to be read and recived.\n const status = topic.msgStatus(msg, true);\n if (status >= Tinode.MESSAGE_STATUS_SENT && msg.from != this.props.myUserId) {\n this.postReadNotification(msg.seq);\n }\n }\n\n handleAllMessagesReceived(count) {\n this.setState({fetchingMessages: false});\n if (!count) {\n // All messages received. Nothing left to receive.\n const topic = this.props.tinode.getTopic(this.state.topic);\n if (topic) {\n // Send read notification for the absolute last message.\n this.postReadNotification(topic.seq);\n }\n return;\n }\n\n // Load pinned message too (if any);\n if (!this.state.pinsLoaded) {\n // This needs to be guarded to avoid an infinite loop.\n // The loop may happen if some pinned messages are deleted.\n const topic = this.props.tinode.getTopic(this.state.topic);\n this.setState({pinsLoaded: true}, _ => {\n topic.getPinnedMessages();\n });\n } else {\n this.setState({pinsLoaded: false});\n }\n }\n\n handleAuxUpdate(aux) {\n const pins = (aux['pins'] || []).slice();\n let selectedPin = this.state.selectedPin;\n if (pins.length > this.state.pins.length) {\n // New pins added, show the latest.\n selectedPin = 0;\n } else if (selectedPin >= pins.length) {\n selectedPin = Math.max(0, pins.length - 1);\n }\n this.setState({pins: pins, selectedPin: selectedPin});\n }\n\n handleInfoReceipt(info) {\n switch (info.what) {\n case 'kp': {\n clearTimeout(this.keyPressTimer);\n this.keyPressTimer = setTimeout(_ => this.setState({typingIndicator: false}), KEYPRESS_DELAY + 1000);\n if (!this.state.typingIndicator) {\n this.setState({typingIndicator: true});\n }\n break;\n }\n case 'read':\n case 'recv':\n // Redraw due to changed recv/read status.\n this.forceUpdate();\n break;\n default:\n console.info(\"Other change in topic: \", info.what);\n }\n }\n\n handleExpandMedia(content) {\n if (!content) {\n return;\n }\n\n if (content.video) {\n this.setState({videoPostview: content});\n } else {\n this.setState({imagePostview: content});\n }\n }\n\n handleClosePreview() {\n if (this.state.imagePreview && this.state.imagePreview.url) {\n URL.revokeObjectURL(this.state.imagePreview.url);\n }\n if (this.state.videoPreview && this.state.videoPreview.url) {\n URL.revokeObjectURL(this.state.videoPreview.url);\n }\n this.setState({\n imagePostview: null,\n imagePreview: null,\n docPreview: null,\n videoPreview: null,\n videoPostview: null,\n });\n this.props.onCancelForwardMessage();\n }\n\n handleFormResponse(action, text, data) {\n if (action == 'pub') {\n this.sendMessage(Drafty.attachJSON(Drafty.parse(text), data));\n } else if (action == 'url') {\n const url = new URL(data.ref);\n const params = url.searchParams;\n for (let key in data.resp) {\n if (data.resp.hasOwnProperty(key)) {\n params.set(key, data.resp[key]);\n }\n }\n ['name', 'seq'].forEach(key => {\n if (data[key]) {\n params.set(key, data[key]);\n }\n });\n params.set('uid', this.props.myUserId);\n params.set('topic', this.state.topic);\n url.search = params;\n window.open(url, '_blank');\n } else {\n console.info(\"Unknown action in form\", action);\n }\n }\n\n handleContextClick(e) {\n e.preventDefault();\n e.stopPropagation();\n this.props.showContextMenu({ topicName: this.state.topic, y: e.pageY, x: e.pageX });\n }\n\n handleShowMessageContextMenu(params, messageSpecificMenuItems) {\n if (params.userFrom == 'chan') {\n params.userFrom = this.state.topic;\n params.userName = this.state.title;\n }\n params.topicName = this.state.topic;\n let menuItems = messageSpecificMenuItems || [];\n // Picking \"回复\" on some other message while already editing one (this.state.reply.editing)\n // silently abandons the edit: handlePickReply overwrites this.state.reply wholesale but never\n // touches contentToEdit, so the composer keeps showing the message being edited while the\n // header/send-icon quietly switch to reply mode -- sending then posts that text as a brand new\n // reply to the other message, and the original edit is lost with no confirmation. Simplest fix\n // is the same one already used for menu_item_edit's window check: just don't offer the option\n // that would cause it, rather than trying to reconcile the two states after the fact.\n if (this.state.reply && this.state.reply.editing) {\n menuItems = menuItems.filter(item => item !== 'menu_item_reply');\n }\n const topic = this.props.tinode.getTopic(params.topicName);\n if (topic) {\n // Edit (Ch.4): chat-message.jsx already gated 'menu_item_edit' on writer + non-attachment\n // content, but has no access to the server-configured edit window (that's session-level state\n // living here, not a per-message prop) -- unlike recall just below, this was never actually\n // filtered by age, so an edit attempt on a message well past the window would only fail at\n // send time instead of never showing the option. Same window-check shape as recall's, just\n // removing the item after the fact instead of adding it, since base eligibility already ran.\n const editWindow = this.state.messagePolicy ? this.state.messagePolicy.edit_window_seconds : 0;\n if (menuItems.includes('menu_item_edit') && !(editWindow > 0 && params.timestamp &&\n params.timestamp.getTime() > (new Date().getTime() - editWindow * 1000))) {\n menuItems = menuItems.filter(item => item !== 'menu_item_edit');\n }\n menuItems.push('menu_item_copy', 'menu_item_favorite');\n // Recall (Ch.4): own message, real seq, and still inside the server-configured window.\n // Distinct from delete -- see context-menu.jsx recallOwnMessage for why both exist.\n // A group admin/owner can also recall *other* members' messages within the same window --\n // server/im_http.go's serveIMMessageRecall calls authorizeIMMessageMutation with\n // allowAdmin=true, so the backend has always accepted this; the reference screenshot\n // (消息页面—长按弹出.png) lists \"群撤回\" as its own, always-shown menu item alongside \"撤回\" --\n // this was previously never offered at all since the only condition checked was authorship.\n //\n // `params.seq > 0` alone is not enough to mean \"a real, server-persisted message\": Tinode\n // SDK gives every message that hasn't been confirmed by the server yet (still sending, or\n // failed outright) a local placeholder seq of LOCAL_SEQID (0xFFFFFFF = 268435455) -- a large\n // *positive* number, so it passed this check. Round 11 live testing reproduced this: sending\n // a message into a since-blocked P2P topic left a bubble stuck in \"发送失败\" with seq\n // 268435455, and this menu still offered \"撤回\" for it -- clicking it fired\n // POST /topics/.../messages/268435455/recall, which the server correctly rejects (no such\n // message), surfacing a confusing \"请求内容有误,请稍后重试\" toast for an action that should\n // never have been offered. `seq < LOCAL_SEQID` excludes exactly that placeholder range,\n // matching the same bound the SDK itself uses internally to distinguish a confirmed seq from\n // a queued one.\n const recallWindow = this.state.messagePolicy ? this.state.messagePolicy.recall_window_seconds : 0;\n const canRecallAsAdmin = topic.isGroupType() && topic.getAccessMode() && topic.getAccessMode().isAdmin();\n if ((params.userFrom == this.props.myUserId || canRecallAsAdmin) && params.seq > 0 && params.seq < LOCAL_SEQID &&\n recallWindow > 0 && params.timestamp && params.timestamp.getTime() > (new Date().getTime() - recallWindow * 1000)) {\n menuItems.push('menu_item_recall');\n }\n // Self -> (1) always hard-delete with [Delete] title.\n // P2P -> (1) hard-delete if allowed and not too old, (2) always soft-delete.\n // Group -> (1) hard-delete if allowed and not too old or owner, (2) always soft-delete.\n if (topic.isSelfType()) {\n // Hard-delete with plain [Delete] title.\n menuItems.push('message_delete_generic');\n } else {\n if (!topic.isChannelType()) {\n // P2P or normal group: always allow to soft-delete.\n menuItems.push('message_delete');\n }\n\n const acs = topic.getAccessMode();\n if (acs && acs.isDeleter()) {\n // Owner can always hard-delete regardless of age.\n let canDelete = acs.isOwner();\n if (!canDelete) {\n // Not owner: check message age if configured on the server.\n const maxDelAge = this.props.tinode.getServerParam(Tinode.MSG_DELETE_AGE, 0) | 0;\n // Make sure the message is not too old. This check is here just to make the UI\n // more user-friendly. The server will enforce the limit regardless of this.\n canDelete = maxDelAge == 0 || (maxDelAge > 0 && params.timestamp ?\n params.timestamp.getTime() > (new Date().getTime() - maxDelAge * 1000) : false);\n }\n if (canDelete) {\n // [Delete for All] title.\n menuItems.push('message_delete_hard');\n }\n }\n }\n }\n menuItems.push('menu_item_select');\n this.props.showContextMenu(params, menuItems);\n }\n\n handleNewChatAcceptance(action) {\n this.props.onNewChat(this.state.topic, action);\n }\n\n handleEnablePeer(e) {\n e.preventDefault();\n this.props.onChangePermissions(this.state.topic, DEFAULT_P2P_ACCESS_MODE, this.state.topic);\n }\n\n // Fetch the real friend/block/pending relationship state for a 1:1 topic so the UI can explain\n // (instead of silently disabling) why sending is restricted. Best-effort: a failed fetch just\n // leaves relationshipContext null and the existing isWriter-based disable stays in effect.\n loadRelationshipContext(topic) {\n if (!topic || !topic.isP2PType()) {\n return;\n }\n const topicName = topic.name;\n getConversationContext(topicName).then(data => {\n if (this.state.topic == topicName) {\n this.setState({relationshipContext: data});\n }\n }).catch(_ => {});\n }\n\n // Ch.6: role badges (docs/images/群标识.png) and the announcement/join-request banners at the top of a\n // group chat (docs/images/群公告状态.png, 新邀请进群申请.png) all need data no P2P topic has -- fetch it\n // once per group-topic-load, same best-effort pattern as loadRelationshipContext above. Every `topic`\n // field these Ch.6 endpoints return is a real grp-prefixed native Tinode name (verified against the Go\n // source), so there's no Ch.5-style translation needed anywhere here.\n loadGroupContext(topic) {\n if (!topic || !topic.isGroupType() || topic.isChannelType()) {\n return;\n }\n const topicName = topic.name;\n getGroupMembers(topicName).then(data => {\n if (this.state.topic != topicName) {\n return;\n }\n const roles = {};\n (data.items || []).forEach(m => { roles[m.user_id] = m.role; });\n this.setState({groupRoles: roles, myGroupRole: roles[this.props.myUserId] || null});\n // Pending join requests can only be resolved by an admin/owner -- only they can act on the banner,\n // and only they pass requireIMGroupMember's IsAdmin() check on the list endpoint itself.\n if (roles[this.props.myUserId] == 'owner' || roles[this.props.myUserId] == 'admin') {\n getGroupJoinRequests(topicName, 'pending').then(reqData => {\n if (this.state.topic == topicName) {\n this.setState({pendingJoinRequests: (reqData.items || []).length});\n }\n }).catch(_ => {});\n }\n }).catch(_ => {});\n getLatestGroupAnnouncement(topicName).then(data => {\n if (this.state.topic == topicName) {\n this.setState({groupAnnouncement: (data && data.content) ? data : null});\n }\n }).catch(_ => {});\n }\n\n // 4.2-4.3 @提醒:只对群话题开放(私聊提@没有意义,也没有可选的\"其他成员\")。返回给\n // send-message.jsx 的选择器渲染,真正的 uid 解析在 mentionSelected 里记下来,供发送时\n // applyMentionResolution 使用。\n mentionSearch(query) {\n const topic = this.props.tinode ? this.props.tinode.getTopic(this.state.topic) : null;\n if (!topic || !topic.isGroupType()) {\n return Promise.resolve([]);\n }\n return getGroupMembers(this.state.topic, {mentionable: true, query}).then(data => {\n const items = data.items || [];\n // \"所有人\" (参考图 @人员—选择提醒人.png 里排在真实成员最前面的合成选项) -- server/topic.go's\n // validateAndNormalizeMentions rejects head.mention_all from anyone who isn't admin\n // (ErrPermissionDenied), so this is only offered to accounts GET .../members already told us\n // can actually use it -- an ineligible account would otherwise see the option, pick it, and\n // have the server silently reject the send.\n const canMentionAll = !!(data.permissions && data.permissions.can_mention_all);\n if (canMentionAll && '所有人'.includes((query || '').trim())) {\n return [{user_id: MENTION_ALL_UID, display_name: '所有人'}, ...items];\n }\n return items;\n });\n }\n\n mentionSelected(uid, name) {\n if (uid === MENTION_ALL_UID) {\n // Not a real Drafty mention to resolve -- sendMessage below reads this flag directly to set\n // head.mention_all, independent of the this.mentionedUsers/applyMentionResolution machinery\n // single-person @提醒 uses. The \"@所有人\" text itself still gets auto-detected by Drafty.parse\n // into an ordinary (uid-less) MN entity and renders highlighted like any other mention --\n // that's just decorative here since the real \"notify everyone\" effect comes from the head flag.\n this.mentionAllPending = true;\n return;\n }\n this.mentionedUsers = (this.mentionedUsers || []).filter(m => m.name !== name);\n this.mentionedUsers.push({uid, name});\n }\n\n // 4.1 跨话题草稿:话题一切换就去问服务端这个会话有没有存过草稿。原生话题名(P2P 用对方\n // user_id)直接可用,接口内部自己会做订阅存在性校验,不需要额外归一化。\n loadDraft(topic) {\n if (!topic) {\n return;\n }\n const topicName = topic.name;\n getTopicDraft(topicName).then(data => {\n if (this.state.topic != topicName) {\n return;\n }\n this.setState({draftText: data.content || '', draftVersion: data.version || 0});\n }).catch(_ => {});\n }\n\n // 输入框每次变化都会调这个(不在这里节流——防抖延迟统一放这一处,跟日报/月报草稿已有的\n // 600ms 防抖是同一个数值,方便以后统一调整)。编辑已有消息、转发预填内容这两种情况下\n // SendMessage 的文本框也会触发 onChange,但那些不是\"新写的草稿\",不应该覆盖真正的草稿。\n //\n // 定时器按话题分开存(this.draftSaveTimers 是个 map),不能像原来那样用单个共享句柄——\n // 那样话题A打字触发的600ms保存,会在300ms后切到话题B打字时被 clearTimeout 直接取消掉,\n // A刚打的字就再也不会发给服务器了。\n //\n // version 在这里(调用的当下,this.state.topic 必然还是 topicName,因为 onMessageChange\n // 只有当前激活话题的 SendMessage 实例会触发)同步捕获进闭包,不能等定时器触发时才去读\n // this.state.draftVersion——那时用户很可能已经切到别的话题,届时重新读到的要么是无关话题\n // 的版本号,要么在判断不匹配时退化成硬编码的 0。后端 PUT .../draft 对 version=0 是\"无条件\n // 跳过乐观锁校验直接覆盖\"而不是\"仅当草稿真的不存在时才创建\"(见\n // docs/IM-后端问题清单-2026-09-04.md),这个 0 一旦被真的发出去,可能无声覆盖掉这段时间里\n // 别的标签页/设备写入的更新草稿。\n handleComposerChange(text) {\n if (this.state.reply && this.state.reply.editing) {\n return;\n }\n if (this.props.forwardMessage) {\n return;\n }\n const topicName = this.state.topic;\n if (!topicName) {\n return;\n }\n const version = this.state.draftVersion || 0;\n this.draftSaveTimers = this.draftSaveTimers || {};\n if (this.draftSaveTimers[topicName]) {\n window.clearTimeout(this.draftSaveTimers[topicName]);\n }\n this.draftSaveTimers[topicName] = window.setTimeout(() => {\n delete this.draftSaveTimers[topicName];\n updateTopicDraft(topicName, text, [], version).then(d => {\n if (this.state.topic == topicName) {\n this.setState({draftVersion: d.version});\n }\n }).catch(_ => {});\n }, 600);\n }\n\n // 消息真的发出去之后,把服务端存的草稿清空——不然重新打开这个会话会看到已经发送过的旧文字。\n // 单纯等下一次防抖自然把空字符串存上去也能达到同样效果,但那样在\"发送后立刻切走\"这个真实\n // 会发生的场景里会有一个几百毫秒的窗口,草稿还是旧内容,不如发送成功后立刻清。\n // knownVersion 由调用方(sendMessage)在发送发起的那一刻同步捕获传入,原因同上——避免在\n // 发送成功回调触发时(用户很可能已经切换话题)重新派生出不可靠的版本号。\n clearDraft(topicName, knownVersion) {\n if (this.draftSaveTimers && this.draftSaveTimers[topicName]) {\n window.clearTimeout(this.draftSaveTimers[topicName]);\n delete this.draftSaveTimers[topicName];\n }\n const version = knownVersion != null ? knownVersion :\n (this.state.topic == topicName) ? (this.state.draftVersion || 0) : 0;\n updateTopicDraft(topicName, '', [], version).then(d => {\n if (this.state.topic == topicName) {\n this.setState({draftText: '', draftVersion: d.version});\n }\n }).catch(_ => {});\n }\n\n // Note: setUrlSidePanel only overwrites path[0] -- called with window.location.hash while a topic is\n // open (path[1] is the open topic), it leaves that segment in place, producing e.g.\n // \"#group-announcement-detail/grpXXX?topic=grpXXX\". handleHashRoute then re-parses path[1] as a topic\n // selector on every hashchange, fighting with the sidepanel that's trying to open and leaving the\n // whole view blank. Build the target hash from an empty path instead of the current one.\n handleShowAnnouncement(e) {\n e.preventDefault();\n // `from=chat` lets Announcement (group-management-view.jsx) tell this entry point apart from\n // the one via group-settings -- both land on the identical path[0]/topic hash otherwise, so\n // without it the \"back\" button can't know whether to return to group-settings or to this chat.\n let hash = HashNavigation.addUrlParam(HashNavigation.setUrlSidePanel('', 'group-announcement-detail'), 'topic', this.state.topic);\n hash = HashNavigation.addUrlParam(hash, 'from', 'chat');\n HashNavigation.navigateTo(hash);\n }\n\n handleShowJoinRequests(e) {\n e.preventDefault();\n // `from=chat` mirrors handleShowAnnouncement above -- lets JoinRequests (group-management-view.jsx)\n // return to this chat instead of always landing on group-governance.\n let hash = HashNavigation.addUrlParam(HashNavigation.setUrlSidePanel('', 'group-join-requests'), 'topic', this.state.topic);\n hash = HashNavigation.addUrlParam(hash, 'from', 'chat');\n HashNavigation.navigateTo(hash);\n }\n\n handleSendFriendVerification(e) {\n e.preventDefault();\n // Same stray-path[1] hazard as handleShowAnnouncement above (build from an empty base, not the\n // current hash, since a topic is open) -- this one additionally never set `uid`, which the\n // friend-verification page needs (contact-management-view.jsx's Verification reads hashParams.uid)\n // to know who the verification is for; for a P2P topic that's simply the topic name itself.\n HashNavigation.navigateTo(HashNavigation.addUrlParam(\n HashNavigation.setUrlSidePanel('', 'friend-verification'), 'uid', this.state.topic));\n }\n\n // 6.3 加入群聊.png:被邀请人在跟邀请人的会话里收到一张\"邀请你加入群聊……立即加入\"的卡片。\n // 后端 serveIMGroupInvitations 确实往这个 P2P 会话发了一条 x-im-type=system_action、\n // template=group_invitation_created 的消息,content.actions 里带着真实的\n // {type:\"group_invitation_accept\", label:\"立即加入\", target_id:}——但\n // chat-message.jsx 原来对所有 system_action/system_notice 消息一律只取 content.text 渲染成\n // 纯文本,这个 action 数据被整体丢弃,卡片上不会出现任何按钮,被邀请人无法接受邀请。\n // acceptGroupInvitation() 这个封装早就在 im-api.js 里,只是从未有调用点。\n handleAcceptGroupInvitation(invitationId) {\n return acceptGroupInvitation(invitationId).then(result => {\n if (result && result.status == 'joined') {\n this.showToast('已加入群聊');\n } else if (result && result.status == 'pending_approval') {\n this.showToast('申请已提交,等待管理员通过');\n } else {\n this.showToast('已处理该邀请');\n }\n return result;\n }).catch(err => {\n this.showToast(err.message || '加入群聊失败,请重试');\n throw err;\n });\n }\n\n showToast(text) {\n this.setState({toast: text});\n window.clearTimeout(this.toastTimer);\n // Matches div.toast.show's own fadein(0.5s) + hold(2.5s) + fadeout(0.5s) animation length,\n // so the class is removed right as the CSS fadeout finishes instead of cutting it short.\n this.toastTimer = window.setTimeout(() => this.setState({toast: null}), 3500);\n }\n\n handleBatchDelete() {\n const topic = this.props.tinode.getTopic(this.state.topic);\n if (!topic || !this.props.selectedSeqs.length) {\n return;\n }\n // A selected message may still be queued/uploading (no server-confirmed seq yet, same case\n // context-menu.jsx's single-message deleteMessages guards with cancelSend before falling\n // back to delMessagesList). delMessagesList's normalizeRanges silently drops local-only\n // seqs instead of cancelling them, so left unfiltered a still-uploading attachment would\n // survive \"delete\" and get sent normally once its upload finishes.\n const remaining = this.props.selectedSeqs.filter(seq => !topic.cancelSend(seq));\n if (!remaining.length) {\n this.props.onExitSelectMode();\n return;\n }\n topic.delMessagesList(remaining, true).then(_ => {\n this.props.onExitSelectMode();\n }).catch(err => {\n this.props.onError(err.message, 'err');\n });\n }\n\n // Per docs/images/多选-选中对话内容-收藏成功.png the selection stays visible behind the toast --\n // unlike delete, favoriting doesn't remove the messages, so there's no reason to exit select mode.\n handleBatchFavorite() {\n if (!this.props.selectedSeqs.length) {\n return;\n }\n const topicName = this.state.topic;\n const seqs = this.props.selectedSeqs.slice();\n favoriteMessages(seqs.map(seq => ({topic: topicName, seq}))).then(() => {\n // `result.failed` can't be trusted here: the batch-create endpoint reuses one request-level\n // Idempotency-Key across every message in the batch (docs/IM-后端问题清单-2026-09-04.md,\n // 新增1), so every item after the first silently no-ops via ON DUPLICATE KEY UPDATE and gets\n // folded into `existing_count` -- indistinguishable, from this response alone, from a message\n // that really was already favorited. Re-reading the actual favorites list and checking which\n // of the messages we just asked for really landed sidesteps that ambiguity entirely.\n return getFavorites({type: 'all', limit: 100}).then(data => {\n const items = (data && data.items) || [];\n const landed = new Set(items\n .filter(it => it.source && it.source.topic == topicName)\n .map(it => String(it.source.seq)));\n const missing = seqs.filter(seq => !landed.has(String(seq)));\n if (missing.length === seqs.length) {\n this.props.onError('收藏失败', 'err');\n } else if (missing.length) {\n this.showToast(`已收藏 ${seqs.length - missing.length}/${seqs.length} 条`);\n } else {\n this.showToast('收藏成功');\n }\n });\n }).catch(err => {\n this.props.onError(err.message, 'err');\n });\n }\n\n sendKeyPress(audio) {\n const topic = this.props.tinode.getTopic(this.state.topic);\n if (!topic.isSubscribed()) {\n return;\n }\n if (audio) {\n // Doc's default for the \"user is recording voice\" indicator is OFF unless product opts in\n // (a non-persisted {note what:\"kpa\"} broadcast to every other group member) -- this was firing\n // unconditionally on every recording, contradicting that documented default. No product signal\n // to turn it on yet, so this is a deliberate no-op rather than a removed feature: re-enable by\n // restoring `topic.noteRecording(true);` here if/when that's confirmed wanted.\n return;\n }\n topic.noteKeyPress();\n }\n\n // sendMessage sends the message with an optional subscription to topic first.\n // typeHint (Ch.7): the backend's imMessageType() classifier -- which drives every type-filtered list\n // in this chapter (favorites tabs, chat-history search/media tabs) -- only recognizes a flat\n // content.file_id/content.url key or an explicit head['x-im-type'] hint; it never walks a real\n // Drafty entity array. Since every attachment this app actually sends uses the standard ent[]\n // format (Drafty.attachFile/insertImage/insertVideo), none of them carry a flat file_id, so without\n // this hint every image/video/file/voice message silently classifies as plain \"text\" server-side.\n // Mutates a parsed Drafty document in place, upgrading any auto-detected \"@name\" MN entity whose\n // raw matched text equals a name the user actually picked from the mention dropdown into a real,\n // uid-bearing mention. Entities that don't match anything tracked (a literal \"@word\" the user just\n // typed, or an edited/mismatched name) are left with their raw text value -- Tinode's own renderer\n // already falls back to displaying that gracefully, this only upgrades the ones it safely can.\n applyMentionResolution(parsed) {\n if (!parsed || !Array.isArray(parsed.ent) || !this.mentionedUsers || !this.mentionedUsers.length) {\n return;\n }\n parsed.ent.forEach(e => {\n if (e.tp === 'MN' && e.data && typeof e.data.val === 'string') {\n const match = this.mentionedUsers.find(m => m.name === e.data.val);\n if (match) {\n e.data.val = match.uid;\n }\n }\n });\n }\n\n sendMessage(msg, uploadCompletionPromise, uploader, typeHint) {\n // Captured before the reply/edit branches below possibly rewrite `msg` into a Drafty object\n // (Drafty.append(...) for a reply-with-quote) -- the URL risk check further down keys off\n // `typeof msg == 'string'`, so without this a plain-text reply containing a link would silently\n // skip the check entirely (a fresh, non-reply message with the same text does get checked).\n const originalText = typeof msg === 'string' ? msg : null;\n let head;\n if (!msg && this.props.forwardMessage) {\n // We are forwarding a message.\n msg = this.props.forwardMessage.msg;\n head = this.props.forwardMessage.head;\n } else if (this.state.reply) {\n if (this.state.reply.editing) {\n if (msg == this.state.contentToEdit) {\n // Message unchanged.\n this.handleCancelReply();\n return;\n }\n // Editing an existing message.\n head = {replace: ':' + this.state.reply.seq};\n } else if (this.state.reply.content) {\n // Replying to a message in this topic.\n // Turn it into Drafty so we can make a quoted Drafty object later.\n head = {reply: '' + this.state.reply.seq};\n if (typeof msg == 'string') {\n msg = Drafty.parse(msg);\n this.applyMentionResolution(msg);\n }\n msg = Drafty.append(Drafty.sanitizeEntities(this.state.reply.content), msg);\n }\n } else if (typeof msg == 'string' && this.mentionedUsers && this.mentionedUsers.length) {\n // 4.2-4.3 @提醒:Drafty.parse 本来就会把纯文本里的\"@word\"自动识别成 MN 实体,但\n // data.val 存的是匹配到的原始文字(tinode.dev.js 的 ENTITY_TYPES 表,pack: val =>\n // ({val: val.slice(1)})),不是 uid——那是纯文本解析器,不可能凭空知道 uid。真正的 uid\n // 只在用户从选择器里点选时才知道,记在 this.mentionedUsers 里;这里按显示名回填,把\n // 自动识别出的占位符换成真的 uid。没有任何选过的提醒时完全不碰 msg,维持字符串原样,\n // 交给 SDK 自己在更底层 parse(跟这次改动之前完全一样的行为,不引入任何差异)。\n const parsed = Drafty.parse(msg);\n this.applyMentionResolution(parsed);\n msg = parsed;\n }\n // Was only cleared on topic switch -- picking someone from the @提醒 picker once left them\n // resolvable for every later message in the same topic too, so literal text \"@张三\" typed by\n // hand, pasted, or quoted from someone else in a LATER, unrelated message would silently turn\n // into a real mention of whoever was last picked under that name. A retry of a failed send\n // (retrySend) reuses the already-resolved Drafty content stored on the failed pub, not this\n // array, so clearing it here doesn't affect retries.\n this.mentionedUsers = [];\n if (this.mentionAllPending) {\n // server/topic.go's validateAndNormalizeMentions reads head.mention_all directly -- it's a\n // separate signal from the Drafty MN entity the \"@所有人\" text itself auto-parses into (that\n // entity has no real uid and is purely decorative here, same as any other unresolved mention).\n // Reset immediately after reading, same lifecycle as this.mentionedUsers just above -- a\n // \"所有人\" pick should only apply to the one message being sent right now, not linger into\n // later ones in the same topic.\n head = {...(head || {}), mention_all: true};\n this.mentionAllPending = false;\n }\n if (typeHint) {\n head = {...(head || {}), 'x-im-type': typeHint};\n }\n\n const topicForDraft = this.state.topic;\n // Captured now, not re-read inside the .then() below -- by the time send actually resolves\n // the user may have switched topics, and clearDraft falling back to a hardcoded 0 runs into\n // the same backend version=0-skips-the-lock issue explained in handleComposerChange above.\n const draftVersionAtSend = this.state.draftVersion || 0;\n const doSend = () => {\n // Was called eagerly above (right after building `msg`/`head` from `this.state.reply`/\n // `this.props.forwardMessage`), synchronously and unconditionally -- including on a message\n // that turns out to need the URL risk dialog below, which only resolves *after* this function\n // already returned. That meant clicking send on a reply/edit containing a link made the\n // \"回复\"/编辑 preview bar vanish immediately, before the user had even seen the risk prompt;\n // clicking \"取消发送\" then left the reply/edit permanently abandoned -- the quoted message was\n // gone from the composer with no way back except manually replying again, even though the user\n // only meant to cancel sending the flagged text, not the reply itself. Moving the call here\n // means it only fires at the point a send is actually going to happen: immediately for the\n // common non-URL case (this function runs synchronously right away, same timing as before),\n // or deferred until \"继续发送\" for a flagged one -- and never at all if the dialog is cancelled,\n // so the reply/edit state and its preview bar correctly survive a cancelled risk prompt.\n this.handleCancelReply();\n const result = this.props.sendMessage(msg, uploadCompletionPromise, uploader, head);\n // Only a plain-text compose (not a reply/edit/forward, all of which pass a Drafty object or\n // reuse contentToEdit rather than the persisted draft) has a server-side draft worth clearing.\n if (originalText != null && result && typeof result.then == 'function' && topicForDraft) {\n result.then(() => this.clearDraft(topicForDraft, draftVersionAtSend));\n }\n return result;\n };\n\n // Pre-send URL risk check (POST /security/urls/check) -- the only Ch.11 \"anti-fraud\" mechanism\n // with a real backend behind it. Only plain-text composed messages are checked (not forwards,\n // uploads, or already-Drafty content) since that's the one path a URL could plausibly be typed in.\n // Returns a promise resolving to `false` when the message was NOT sent (blocked/cancelled) so\n // send-message.jsx can leave the composer text intact instead of optimistically clearing it --\n // without this, a blocked message's text would just vanish with no failed-message trace to retry.\n // Was missing the `g` flag -- .match() without it only ever returns the FIRST url in the message,\n // so a second url (e.g. the phishing link in \"看这个 https://safe.example.com 但是别信这个\n // https://phish.example.com/login?token=abc\") never got checked at all as long as the first one\n // came back `allow`. Check every distinct url in the message and act on the riskiest verdict.\n const urlMatches = originalText && originalText.match(/https?:\\/\\/\\S+/g);\n if (urlMatches) {\n const RISK_RANK = {block: 2, warn: 1, allow: 0};\n const urls = Array.from(new Set(urlMatches));\n return Promise.all(urls.map(url => checkURL(url, 'message_compose'))).then(results => {\n const result = results.reduce((worst, r) => (RISK_RANK[r.decision] || 0) > (RISK_RANK[worst.decision] || 0) ? r : worst);\n if (result.decision === 'allow') {\n return doSend();\n }\n return new Promise(resolve => {\n // riskDialog is a single slot -- if an earlier risk check is still awaiting the user's\n // decision (two messages sent in quick succession, both flagged), overwriting it here\n // would leave that first promise permanently unresolved and its message silently dropped\n // with send-message.jsx never told to stop holding it as unsent. Resolving it `false` first\n // means it's treated the same as the user cancelling it -- lost, but not hung forever.\n if (this.state.riskDialog) this.state.riskDialog.resolve(false);\n this.setState({riskDialog: {blocked: result.decision === 'block', challengeId: result.risk_challenge_id, send: doSend, resolve}});\n });\n }).catch(_ => doSend()); // Don't let a risk-check failure block sending altogether.\n }\n\n return doSend();\n }\n\n handleRiskConfirm() {\n const dialog = this.state.riskDialog;\n if (!dialog) return;\n this.setState({riskDialog: null});\n const finish = () => dialog.resolve(dialog.send());\n if (dialog.challengeId) {\n confirmRiskChallenge(dialog.challengeId, 'continue').then(finish).catch(finish);\n } else {\n finish();\n }\n }\n\n handleRiskCancel() {\n const dialog = this.state.riskDialog;\n if (!dialog) return;\n this.setState({riskDialog: null});\n if (dialog.challengeId && !dialog.blocked) {\n confirmRiskChallenge(dialog.challengeId, 'cancel').catch(_ => {});\n }\n dialog.resolve(false);\n }\n\n // Retry sending a message.\n retrySend(pub) {\n this.props.sendMessage(pub.content, undefined, undefined, pub.head)\n .then(_ => {\n // All good. Remove the original message draft from the cache.\n const topic = this.props.tinode.getTopic(this.state.topic);\n topic.delMessagesList([pub.seq], true);\n });\n }\n\n // sendFileAttachment sends the file as Drafty message:\n // - if file is too large, upload it and send a s link.\n // - if file is small enough, just send it in-band.\n sendFileAttachment(file) {\n // Server-provided limit reduced for base64 encoding and overhead.\n const maxInbandAttachmentSize = (this.props.tinode.getServerParam('maxMessageSize',\n MAX_INBAND_ATTACHMENT_SIZE) * 0.75 - 1024) | 0;\n\n if (TheCard.isFileSupported(file.type, file.name) || file.type == TheCard.contentType) {\n // This is a vCard file, try to convert and send as TheCard.\n if (this.sendTheCardAttachment(file, maxInbandAttachmentSize)) {\n // Successfully sent as TheCard.\n return;\n }\n // Sending as TheCard failed, fall through to sending as generic file attachment.\n }\n\n // If the attachment is a JSON file, then use 'application/octet-stream' instead of 'application/json'.\n // This is a temporary workaround for the collision with the 'application/json' MIME type of form responses.\n // Remove this code in 2026 or so.\n const jsonMimeConverter = (fileType) => fileType === DRAFTY_FR_MIME_TYPE_LEGACY ? 'application/octet-stream' : fileType;\n\n if (file.size > maxInbandAttachmentSize) {\n // Too large to send inband - uploading out of band and sending as a link.\n const uploader = createChatUploader(this.props.tinode);\n if (!uploader) {\n this.props.onError(this.props.intl.formatMessage(messages.cannot_initiate_upload));\n return;\n }\n const uploadCompletionPromise = uploader.upload(file);\n const msg = Drafty.attachFile(null, {\n mime: jsonMimeConverter(file.type),\n filename: file.name,\n size: file.size,\n urlPromise: uploadCompletionPromise\n });\n // Pass data and the uploader to the TinodeWeb.\n this.sendMessage(msg, uploadCompletionPromise, uploader, 'file');\n } else {\n // Small enough to send inband.\n fileToBase64(file)\n .then(b64 => this.sendMessage(Drafty.attachFile(null, {\n mime: jsonMimeConverter(b64.mime),\n data: b64.bits,\n filename: b64.name,\n size: file.size\n }), undefined, undefined, 'file'))\n .catch(err => this.props.onError(err.message, 'err'));\n }\n }\n\n // Convert attached vCard to TheCard and send.\n sendTheCardAttachment(file, maxInbandAttachmentSize) {\n if (file.size > maxInbandAttachmentSize) {\n // Cannot convert to TheCard, send as a generic file attachment instead.\n return false;\n }\n\n if (file.type == TheCard.contentType) {\n // Already TheCard, no need to convert.\n this.sendMessage(Drafty.appendTheCard(null, file.object));\n return true;\n }\n\n importVCard(file)\n .then(card => {\n this.sendMessage(Drafty.appendTheCard(null, card));\n })\n .catch(err => {\n this.props.onError(this.props.intl.formatMessage(messages.cannot_parse_vcard, {error: err.message}), 'err');\n });\n return true;\n }\n\n // handleAttachFile method is called when [Attach file] button is clicked: launch attachment preview.\n handleAttachFile(file) {\n const maxExternAttachmentSize = this.props.tinode.getServerParam('maxFileUploadSize', MAX_EXTERN_ATTACHMENT_SIZE);\n\n if (file.size > maxExternAttachmentSize) {\n // Too large.\n this.props.onError(this.props.intl.formatMessage(messages.file_attachment_too_large,\n {size: bytesToHumanSize(file.size), limit: bytesToHumanSize(maxExternAttachmentSize)}), 'err');\n } else {\n this.setState({\n docPreview: {\n file: file,\n name: file.name,\n size: file.size,\n type: file.type\n }\n });\n }\n }\n\n handleCallHangup(topic, seq) {\n this.props.onVideoCallClosed();\n this.setState({\n rtcPanel: null\n });\n this.props.onCallHangup(topic, seq);\n }\n\n handleCallPanelToggle() {\n this.setState({minimizedCallPanel: !this.state.minimizedCallPanel});\n }\n\n // sendImageAttachment sends the image bits as Drafty message.\n sendImageAttachment(caption, blob) {\n const mime = this.state.imagePreview.mime;\n const width = this.state.imagePreview.width;\n const height = this.state.imagePreview.height;\n const fname = this.state.imagePreview.filename;\n\n // Server-provided limit reduced for base64 encoding and overhead.\n const maxInbandAttachmentSize = (this.props.tinode.getServerParam('maxMessageSize',\n MAX_INBAND_ATTACHMENT_SIZE) * 0.75 - 1024) | 0;\n\n if (blob.size > maxInbandAttachmentSize) {\n // Too large to send inband - uploading out of band and sending as a link.\n const uploader = createChatUploader(this.props.tinode);\n if (!uploader) {\n this.props.onError(this.props.intl.formatMessage(messages.cannot_initiate_upload));\n return;\n }\n const uploadCompletionPromise = uploader.upload(blob);\n\n // Make small preview to show while uploading.\n imageScaled(blob, IMAGE_PREVIEW_DIM, IMAGE_PREVIEW_DIM, -1, false)\n // Convert tiny image into base64 for serialization and previewing.\n .then(scaled => blobToBase64(scaled.blob))\n .then(b64 => {\n let msg = Drafty.insertImage(null, 0, {\n mime: mime,\n _tempPreview: b64.bits, // This preview will not be serialized.\n bits: b64.bits, // Image thumbnail.\n width: width,\n height: height,\n filename: fname,\n size: blob.size,\n urlPromise: uploadCompletionPromise\n });\n if (caption) {\n msg = Drafty.appendLineBreak(msg);\n msg = Drafty.append(msg, Drafty.parse(caption));\n }\n // Pass data and the uploader to the TinodeWeb.\n this.sendMessage(msg, uploadCompletionPromise, uploader, 'image');\n })\n .catch(err => this.props.onError(err, 'err'));\n return;\n }\n\n // Send the image inband if it's not too big. The image has been scaled already\n // in image preview.\n blobToBase64(blob)\n .then(b64 => {\n let msg = Drafty.insertImage(null, 0, {\n mime: b64.mime,\n bits: b64.bits,\n width: width,\n height: height,\n filename: fname,\n size: blob.size\n });\n if (caption) {\n msg = Drafty.appendLineBreak(msg);\n msg = Drafty.append(msg, Drafty.parse(caption));\n }\n this.sendMessage(msg, undefined, undefined, 'image');\n });\n }\n\n // sendVideoAttachment sends the video bits as Drafty message.\n sendVideoAttachment(caption, videoBlob, previewBlob, params) {\n const width = params.width;\n const height = params.height;\n\n // Server-provided limit reduced for base64 encoding and overhead.\n const maxInbandAttachmentSize = (this.props.tinode.getServerParam('maxMessageSize',\n MAX_INBAND_ATTACHMENT_SIZE) * 0.75 - 1024) | 0;\n\n const uploads = [];\n let uploader;\n if ((videoBlob.size + previewBlob.size) > maxInbandAttachmentSize) {\n // One or both are too large to send inband. Uploading out of band and sending as a link.\n uploader = createChatUploader(this.props.tinode);\n if (!uploader) {\n this.props.onError(this.props.intl.formatMessage(messages.cannot_initiate_upload));\n return;\n }\n\n uploads[0] = videoBlob.size > maxInbandAttachmentSize * 0.675 ? uploader.upload(videoBlob) : null;\n uploads[1] = previewBlob.size > maxInbandAttachmentSize * 0.275 ? uploader.upload(previewBlob) : null;\n }\n\n if (uploads.length == 0) {\n // Both video and preview are small enough to send inband.\n Promise.all([blobToBase64(videoBlob), blobToBase64(previewBlob)])\n .then(b64s => {\n const [v64, i64] = b64s;\n let msg = Drafty.insertVideo(null, 0, {\n mime: v64.mime,\n bits: v64.bits,\n preview: i64.bits,\n premime: i64.mime,\n width: width,\n height: height,\n duration: params.duration,\n filename: params.name,\n size: videoBlob.size\n });\n if (caption) {\n msg = Drafty.appendLineBreak(msg);\n msg = Drafty.append(msg, Drafty.parse(caption));\n }\n this.sendMessage(msg, undefined, undefined, 'video');\n });\n return;\n }\n\n const uploadCompletionPromise = Promise.all(uploads);\n\n const b64conv = [];\n // Small video converted to base64.\n b64conv[0] = uploads[0] ? null : blobToBase64(videoBlob);\n // Full-size preview fits inline.\n b64conv[1] = uploads[1] ? null : imageScaled(previewBlob, MAX_IMAGE_DIM, MAX_IMAGE_DIM, -1, false)\n .then(scaled => blobToBase64(scaled.blob));\n // Small preview to show while uploading.\n b64conv[2] = imageScaled(previewBlob, VIDEO_PREVIEW_DIM, VIDEO_PREVIEW_DIM, -1, false)\n .then(scaled => blobToBase64(scaled.blob));\n // Convert tiny image into base64 for serialization and previewing.\n Promise.all(b64conv)\n .then(b64s => {\n const [video, img, preview] = b64s;\n let msg = Drafty.insertVideo(null, 0, {\n mime: params.mime,\n bits: video ? video.bits : null,\n _tempPreview: preview.bits,\n preview: img ? img.bits : preview.bits,\n premime: img ? img.mime : preview.mime,\n width: width,\n height: height,\n duration: params.duration,\n filename: params.name,\n size: videoBlob.size,\n urlPromise: uploadCompletionPromise\n });\n\n if (caption) {\n msg = Drafty.appendLineBreak(msg);\n msg = Drafty.append(msg, Drafty.parse(caption));\n }\n // Pass data and the uploader to the TinodeWeb.\n this.sendMessage(msg, uploadCompletionPromise, uploader, 'video');\n })\n .catch(err => this.props.onError(err.message, 'err'));\n }\n\n // handleAttachImageOrVideo method is called when [Attach image or video] button is clicked: launch image or video preview.\n handleAttachImageOrVideo(file) {\n const maxExternAttachmentSize = this.props.tinode.getServerParam('maxFileUploadSize', MAX_EXTERN_ATTACHMENT_SIZE);\n\n if (file.type.startsWith('video/')) {\n this.setState({videoPreview: {\n url: URL.createObjectURL(file),\n blob: file,\n filename: file.name,\n size: file.size,\n mime: file.type\n }});\n return;\n }\n\n // Get image dimensions and size, optionally scale it down.\n imageScaled(file, MAX_IMAGE_DIM, MAX_IMAGE_DIM, maxExternAttachmentSize, false)\n .then(scaled => {\n this.setState({imagePreview: {\n url: URL.createObjectURL(scaled.blob),\n blob: scaled.blob,\n filename: scaled.name,\n width: scaled.width,\n height: scaled.height,\n size: scaled.blob.size,\n mime: scaled.mime\n }});\n }).catch(err => {\n this.props.onError(err.message, 'err');\n });\n }\n\n // handleFileDrop is called when the user drags & drops a file upon the message view.\n handleFileDrop(files) {\n if (!files || files.length == 0) {\n return;\n }\n const file = files[0];\n if (file.type && file.type.startsWith('image/')) {\n this.handleAttachImageOrVideo(file);\n } else {\n this.handleAttachFile(file);\n }\n }\n\n // sendAudioAttachment sends audio bits inband as Drafty message (no preview).\n sendAudioAttachment(url, preview, duration) {\n fetch(url)\n .then(result => result.blob())\n .then(blob => {\n // Server-provided limit reduced for base64 encoding and overhead.\n const maxInbandAttachmentSize = this.props.tinode.getServerParam('maxMessageSize', MAX_INBAND_ATTACHMENT_SIZE) * 0.75 - 1024;\n if (blob.size > maxInbandAttachmentSize) {\n // Too large to send inband - uploading out of band and sending as a link.\n const uploader = createChatUploader(this.props.tinode);\n if (!uploader) {\n this.props.onError(this.props.intl.formatMessage(messages.cannot_initiate_upload));\n return;\n }\n const uploadCompletionPromise = uploader.upload(blob);\n const msg = Drafty.appendAudio(null, {\n mime: blob.type,\n size: blob.size,\n duration: duration,\n preview: preview,\n urlPromise: uploadCompletionPromise\n });\n // Pass data and the uploader to the TinodeWeb.\n this.sendMessage(msg, uploadCompletionPromise, uploader, 'voice');\n } else {\n // Small enough to send inband.\n blobToBase64(blob)\n .then(b64 => {\n this.sendMessage(Drafty.appendAudio(null, {\n mime: b64.mime,\n bits: b64.bits,\n size: blob.size,\n duration: duration,\n preview: preview,\n }), undefined, undefined, 'voice')\n })\n }\n })\n .catch(err => {this.props.onError(err.message, 'err')});;\n }\n\n handleCancelUpload(seq, uploader) {\n const topic = this.props.tinode.getTopic(this.state.topic);\n const found = topic.findMessage(seq);\n if (found) {\n found._cancelled = true;\n }\n uploader.cancel();\n }\n\n // seq: seq ID of the source message\n // context: message content.\n // senderId: UID of the sender of the source message.\n // senderName: full name of the sender of the original message.\n handlePickReply(seq, content, senderId, senderName) {\n if (!seq || !content) {\n this.setState({reply: null});\n return;\n }\n\n content = typeof content == 'string' ? Drafty.init(content) : content;\n if (Drafty.isValid(content)) {\n content = Drafty.replyContent(content, QUOTED_REPLY_LENGTH);\n } else {\n // /!\\ invalid content.\n content = Drafty.append(Drafty.init('\\u26A0 '),\n Drafty.wrapInto(this.props.intl.formatMessage(messages.invalid_content), 'EM'));\n }\n\n this.setState({\n reply: {\n content: Drafty.quote(senderName, senderId, content),\n seq: seq\n }\n });\n this.props.onCancelForwardMessage();\n }\n\n // seq: seq ID of the message to edit.\n // context: message content.\n handleEditMessage(seq, content) {\n if (!seq || !content) {\n this.setState({reply: null});\n return;\n }\n\n content = typeof content == 'string' ? Drafty.init(content) : content;\n const editable = Drafty.toMarkdown(content);\n if (Drafty.isValid(content)) {\n content = Drafty.replyContent(content, EDIT_PREVIEW_LENGTH);\n } else {\n // /!\\ invalid content.\n content = Drafty.append(Drafty.init('\\u26A0 '),\n Drafty.wrapInto(this.props.intl.formatMessage(messages.invalid_content), 'EM'));\n }\n\n this.setState({\n reply: {\n content: Drafty.quote(this.props.intl.formatMessage(messages.editing_message), null, content),\n seq: seq,\n editing: true\n },\n contentToEdit: editable\n });\n this.props.onCancelForwardMessage();\n }\n\n\n handleCancelReply() {\n this.setState({reply: null, contentToEdit: null});\n this.props.onCancelForwardMessage();\n }\n\n handleQuoteClick(replyToSeq) {\n const ref = this.getOrCreateMessageRef(replyToSeq);\n if (ref && ref.current) {\n ref.current.scrollIntoView({block: \"center\", behavior: \"smooth\"});\n ref.current.classList.add('flash');\n setTimeout(_ => {ref.current.classList.remove('flash')} , 1000);\n } else {\n // Most commonly hit when the target message was deleted/recalled after being found by\n // Ch.7 chat-history search but before this click -- never gets a ref\n // (see jumpToMessage below), so without this the click did nothing visible at all.\n console.error(\"Unresolved message ref\", replyToSeq);\n if (this.props.onError) {\n this.props.onError('该消息已被删除或撤回', 'err');\n }\n }\n }\n\n // Ch.7 chat-history search result -> jump to the message in the real conversation. handleQuoteClick\n // only scrolls to a message already present in this topic's locally-cached message list (used\n // elsewhere for quoted-reply/pinned-message jumps, where that's always true); a search result can\n // point at a message far outside whatever window happens to be loaded, so fetch a window around it\n // first via the native SDK (not the REST search API -- handleQuoteClick reads refs off the SDK's own\n // local topic cache, so the data has to land there, which only getMeta does).\n jumpToMessage(seq) {\n const topic = this.props.tinode && this.props.topic ? this.props.tinode.getTopic(this.props.topic) : null;\n if (!topic || !seq || isNaN(seq)) {\n return;\n }\n HashNavigation.navigateTo(HashNavigation.removeUrlParam(window.location.hash, 'jumpseq'));\n const jump = () => window.setTimeout(() => this.handleQuoteClick(seq), 150);\n if (topic.findMessage(seq)) {\n jump();\n } else {\n topic.getMeta(topic.startMetaQuery().withData(Math.max(1, seq - 20), seq + 21, 41).build())\n .then(jump).catch(err => this.props.onError(err.message, 'err'));\n }\n }\n\n handleUnpinMessage(seq) {\n const topic = this.props.tinode.getTopic(this.state.topic);\n topic.pinMessage(seq, false);\n }\n\n isDragEnabled() {\n // Same editing-state guard as the attach-panel props in render() (see the `editingMessage`\n // local there) -- drag&drop is a second, independent path into handleFileDrop below, which\n // calls handleAttachImageOrVideo/handleAttachFile directly rather than through those props, so\n // gating only the props left this route as a full bypass of that guard: dropping a file while\n // editing a message (without touching the \"+\" button at all) still replaced the edited\n // message's content via sendMessage's head.replace, with no confirmation.\n const editingMessage = !!(this.state.reply && this.state.reply.editing);\n return this.state.isWriter && !this.state.unconfirmed && !this.props.forwardMessage &&\n !this.state.peerMessagingDisabled && !editingMessage;\n }\n\n handleDragStart(e) {\n e.preventDefault();\n e.stopPropagation();\n e.dataTransfer.clearData();\n }\n\n handleDragIn(e) {\n e.preventDefault();\n e.stopPropagation();\n this.dragCounter++;\n if (e.dataTransfer.items && e.dataTransfer.items.length > 0) {\n this.setState({dragging: true});\n }\n }\n\n handleDragOut(e) {\n e.preventDefault();\n e.stopPropagation();\n this.dragCounter--;\n if (this.dragCounter <= 0) {\n this.setState({dragging: false});\n }\n }\n\n handleDrag(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleDrop(e) {\n e.preventDefault();\n e.stopPropagation();\n this.setState({dragging: false});\n if (this.isDragEnabled() && e.dataTransfer.files && e.dataTransfer.files.length > 0) {\n this.handleFileDrop(e.dataTransfer.files);\n this.dragCounter = 0;\n }\n }\n\n render() {\n const {formatMessage} = this.props.intl;\n\n // P2P call is an overlay, not a separate component because it cannot be\n // re-mounted between full screen/minimized.\n const overlay = this.state.rtcPanel &&\n }>\n \n ;\n\n const riskDialog = this.state.riskDialog &&\n ;\n\n let component;\n if (!this.state.topic) {\n component = ;\n\n } else {\n let component2;\n if (this.state.imagePreview) {\n // Preview image before sending.\n component2 = (\n }>\n \n \n );\n } else if (this.state.videoPreview) {\n // Preview video.\n component2 = }>\n \n ;\n\n } else if (this.state.imagePostview) {\n // Expand received image.\n component2 = }>\n \n ;\n\n } else if (this.state.videoPostview) {\n // Play received video.\n component2 = }>\n \n ;\n\n } else if (this.state.docPreview) {\n // Preview attachment before sending.\n if (TheCard.isFileSupported(this.state.docPreview.type, this.state.docPreview.name) ||\n this.state.docPreview.type == TheCard.contentType) {\n component2 = }>\n \n ;\n } else {\n component2 = }>\n \n ;\n }\n } else {\n const topic = this.props.tinode.getTopic(this.state.topic);\n const isChannel = topic.isChannelType() || topic.chan;\n const groupTopic = topic.isGroupType() && !isChannel;\n const icon_badges = [];\n if (topic.trusted) {\n if (topic.trusted.verified) {\n icon_badges.push({icon: 'verified', color: 'badge-inv'});\n }\n if (topic.trusted.staff) {\n icon_badges.push({icon: 'staff', color: 'badge-inv'});\n }\n if (topic.trusted.danger) {\n icon_badges.push({icon: 'dangerous', color: 'badge-inv'});\n }\n }\n\n const pinnedMessages = [];\n this.state.pins.forEach(seq => pinnedMessages.push(topic.latestMsgVersion(seq) || topic.findMessage(seq)));\n\n const messageNodes = [];\n let previousFrom = null;\n let prevDate = null;\n // Set upfront (not just inside the loop below) so an empty (zero-message) conversation still\n // gets the base .chat-box class instead of leaving
    with no class at all.\n let chatBoxClass = groupTopic ? 'chat-box group' : 'chat-box';\n topic.messages((msg, prev, next, i) => {\n let nextFrom = next ? (next.from || 'chan') : null;\n\n let sequence = 'single';\n let thisFrom = msg.from || 'chan';\n if (thisFrom == previousFrom) {\n if (thisFrom == nextFrom) {\n sequence = 'middle';\n } else {\n sequence = 'last';\n }\n } else if (thisFrom == nextFrom) {\n sequence = 'first';\n }\n previousFrom = thisFrom;\n\n const isReply = !(thisFrom == this.props.myUserId);\n const deliveryStatus = topic.msgStatus(msg, true);\n\n let userFrom = thisFrom, userName, userAvatar;\n const user = topic.userDesc(thisFrom);\n if (user && user.public) {\n userName = user.public.fn;\n userAvatar = makeImageUrl(user.public.photo);\n }\n\n // Ref for this chat message.\n const ref = this.getOrCreateMessageRef(msg.seq);\n let replyToSeq = msg.head ? parseInt(msg.head.reply) : null;\n if (!replyToSeq || isNaN(replyToSeq)) {\n replyToSeq = null;\n }\n\n // group_invitation_created is the one system_action template with a real, backend-honored\n // action button (see chat-message.jsx's renderGroupInvitationCard) -- it still needs the\n // full ChatMessage bubble treatment. Every other system_action/system_notice template is\n // purely informational and belongs in the plain centered style below.\n const systemActions = msg.content && typeof msg.content == 'object' && Array.isArray(msg.content.actions) ?\n msg.content.actions : null;\n const isActionableSystemMessage = systemActions && systemActions.some(a => a && a.type == 'group_invitation_accept');\n const isPlainSystemMessage = msg.head && (msg.head['x-im-type'] == 'system_notice' || msg.head['x-im-type'] == 'system_action') &&\n !isActionableSystemMessage && msg.content && typeof msg.content == 'object' && typeof msg.content.text == 'string';\n\n if (msg.hi) {\n // Deleted message.\n messageNodes.push(\n \n );\n } else if (isPlainSystemMessage) {\n const thisDate = new Date(msg.ts);\n if (!prevDate || prevDate.toDateString() != thisDate.toDateString()) {\n messageNodes.push(\n \n );\n prevDate = thisDate;\n }\n messageNodes.push(\n \n );\n } else {\n const thisDate = new Date(msg.ts);\n // This message was sent on a different date than the previous.\n if (!prevDate || prevDate.toDateString() != thisDate.toDateString()) {\n messageNodes.push(\n \n );\n prevDate = thisDate;\n }\n messageNodes.push(\n \n );\n }\n });\n\n let lastSeen = null;\n if (isChannel) {\n if (topic.subcnt) {\n lastSeen = formatMessage(messages.subscriber_count, {count: topic.subcnt});\n }\n } else {\n const cont = this.props.tinode.getMeTopic().getContact(this.state.topic);\n if (cont) {\n if (Tinode.isP2PTopicName(cont.topic)) {\n if (cont.online) {\n lastSeen = formatMessage(messages.online_now);\n } else if (cont.seen) {\n lastSeen = formatMessage(messages.last_seen,\n {timestamp: shortDateFormat(cont.seen.when, this.props.intl.locale)});\n // TODO: also handle user agent in c.seen.ua\n }\n } else if (Tinode.isGroupTopicName(cont.topic)) {\n if (topic.subcnt) {\n lastSeen = formatMessage(messages.member_count, {count: topic.subcnt});\n }\n }\n }\n }\n const avatar = this.state.avatar || true;\n const online = this.state.deleted || topic.isSelfType() ? null :\n this.props.online ? 'online' + (this.state.typingIndicator ? ' typing' : '') : 'offline';\n\n const titleClass = 'panel-title' + (this.state.deleted ? ' deleted' : '');\n const darkModeClass = this.props.colorSchema == 'dark' ? 'dark' : '';\n // sendMessage() unconditionally sends whatever content it's given with head={replace:...}\n // while this.state.reply.editing is set (see sendMessage above) -- it has no way to tell\n // \"the user is still editing the original text\" apart from \"the user just picked a photo/\n // file/card/favorite from the attachment panel while that edit was still open\". Gating the\n // attach entry points closed here (same mechanism already used for forwardMessage below) is\n // simpler and safer than trying to teach sendMessage to distinguish those cases after the fact.\n const editingMessage = !!(this.state.reply && this.state.reply.editing);\n\n let messagesComponent = (\n <>\n {this.state.groupAnnouncement ?\n \n campaign\n {this.state.groupAnnouncement.content}\n chevron_right\n : null}\n {this.state.pendingJoinRequests > 0 ?\n \n person_add_alt\n 新邀请进群申请({this.state.pendingJoinRequests})\n chevron_right\n : null}\n
    \n \n
    \n
      \n {messageNodes}\n
    \n
    \n {!this.state.isReader ?\n
    \n {this.state.readingBlocked ?\n
    \n \n
    \n : null }\n
    \n : null }\n
    \n check {this.state.toast}\n
    \n
    \n {this.state.peerMessagingDisabled && !this.state.unconfirmed ?\n
    \n block .\n
    : null}\n {!this.state.unconfirmed && this.state.relationshipContext &&\n this.state.relationshipContext.relationship == 'pending_inbound' ?\n
    以上是打招呼的消息
    : null}\n {!this.state.unconfirmed && this.state.relationshipContext &&\n this.state.relationshipContext.relationship == 'pending_outbound' ?\n
    好友申请正在等待处理
    : null}\n {!this.state.unconfirmed && this.state.relationshipContext &&\n this.state.relationshipContext.relationship == 'none' ?\n
    你们还不是好友,发送消息前需先验证 发送朋友验证
    : null}\n {this.props.selectMode ?\n \n : this.state.unconfirmed ?\n \n :\n }\n \n );\n\n component2 = (\n <>\n
    \n {this.props.displayMobile ?\n {e.preventDefault(); this.leave(this.state.topic); this.props.onHideMessagesView();}}>\n arrow_back\n \n :\n null}\n
    \n \n {!isChannel ? : null}\n
    \n
    \n
    {\n this.state.title ||\n \n }
    \n
    {lastSeen}
    \n
    \n
    \n {!this.props.displayMobile && this.state.pins.length > 0 ?\n this.setState({selectedPin: index})}\n onSelected={this.handleQuoteClick}\n onCancel={this.handleUnpinMessage} />\n : null}\n {groupTopic ?\n :\n null\n }\n \n
    \n {this.props.displayMobile ?\n <>\n {this.state.pins.length > 0 ?\n this.setState({selectedPin: index})}\n onSelected={this.handleQuoteClick}\n onCancel={this.handleUnpinMessage} />\n : null\n }\n \n \n : null}\n \n {messagesComponent}\n {this.state.dragging && this.isDragEnabled() ?\n
    {formatMessage(messages.drag_file)}
    \n : null}\n \n );\n }\n component =
    {component2}{overlay}{riskDialog}
    \n }\n return component;\n }\n};\n\nexport default injectIntl(MessagesView);\n","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport FileProgress from './file-progress.jsx';\nimport { createFileDownloader } from '../lib/im-api.js';\nimport { bytesToHumanSize } from '../lib/strformat.js';\nimport { isUrlRelative, sanitizeUrl } from '../lib/utils.js';\n\n// Same broad-category icon+color convention already established for file cards elsewhere\n// (content-library-view.jsx / group-management-view.jsx's FILE_TYPE_META) -- this was the one place\n// that never adopted it and instead used the same generic gray icon for every attachment regardless\n// of type. This client-side mime sniff exists only because chat attachments (unlike a group file\n// or a favorite) don't carry a server-computed file_type field to look up directly.\nconst ATTACHMENT_TYPE_META = {image: ['image', '#3ba55c'], video: ['videocam', '#3b82c4'], audio: ['audiotrack', '#8b5cf6'], document: ['description', '#e05d44'], file: ['insert_drive_file', '#8a8f98']};\nfunction attachmentTypeFromMime(mime) {\n const m = (mime || '').toLowerCase();\n if (m.startsWith('image/')) return 'image';\n if (m.startsWith('video/')) return 'video';\n if (m.startsWith('audio/')) return 'audio';\n if (m === 'application/pdf' || m === 'text/plain' || m.includes('msword') || m.includes('wordprocessingml') ||\n m.includes('spreadsheetml') || m.includes('presentationml') || m === 'application/vnd.ms-excel' || m === 'application/vnd.ms-powerpoint') {\n return 'document';\n }\n return 'file';\n}\n\nexport default class Attachment extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n downloader: null,\n progress: 0\n };\n\n this.downloadFile = this.downloadFile.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n }\n\n downloadFile(url, filename, mimetype) {\n if (!url) {\n this.props.onError(\"Invalid download URL '\" + url + \"'\");\n return;\n }\n\n // Same wrong-header bug as content-library-view.jsx's DownloadPage (X-Tinode-APIKey/\n // X-Tinode-Auth, neither recognized by this backend) -- confirmed live: clicking \"保存\" on any\n // real chat file attachment 403'd with \"valid API key required\". createFileDownloader() is the\n // fixed-headers drop-in with the same download()/cancel() interface.\n const downloader = createFileDownloader(this.props.tinode);\n this.setState({downloader: downloader});\n downloader.download(url, filename, mimetype,\n loaded => this.setState({progress: loaded / this.props.size}),\n err => this.props.onError(err, 'err')\n )\n .then(_ => this.setState({downloader: null, progress: 0}))\n .catch(err => {\n if (err) {\n this.props.onError(\"Error downloading file: \" + err.message, 'err');\n }\n this.setState({downloader: null, progress: 0});\n });\n }\n\n handleCancel() {\n if (this.props.uploading) {\n this.props.onCancelUpload();\n } else if (this.state.downloader) {\n this.state.downloader.cancel();\n }\n }\n\n render() {\n let filename = this.props.filename || 'file_attachment';\n if (filename.length > 36) {\n filename = filename.substr(0, 16) + '...' + filename.substr(-16);\n }\n let size = this.props.size > 0 ?\n ({bytesToHumanSize(this.props.size)}) :\n null;\n\n // Detect if the download URL is relative or absolute.\n // If the URL is relative use LargeFileHelper to attach authentication\n // credentials to the request.\n let url, helperFunc;\n if (!this.props.uploading && !this.state.downloader && isUrlRelative(this.props.downloadUrl)) {\n // Relative URL. Use download helper.\n url = '#';\n helperFunc = (e) => {\n e.preventDefault();\n this.downloadFile(this.props.downloadUrl, this.props.filename, this.props.mimetype);\n };\n } else {\n url = sanitizeUrl(this.props.downloadUrl);\n helperFunc = null;\n }\n const downloadWidget = <>file_download ;\n const [icon, color] = ATTACHMENT_TYPE_META[attachmentTypeFromMime(this.props.mimetype)];\n return (\n
    \n
    {icon}
    \n
    \n
    {filename} {size}
    \n {this.props.uploading || this.state.downloader ?\n \n :\n
    {url ?\n {downloadWidget}\n :\n {downloadWidget}\n }
    \n }\n
    \n
    \n );\n }\n};\n","// Single chat message bubble, sent or received.\n\nimport React from 'react';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport { Drafty, Tinode, TheCard } from 'tinode-sdk';\n\nimport Attachment from './attachment.jsx';\nimport ForwardBundle from './forward-bundle.jsx';\nimport LetterTile from './letter-tile.jsx';\nimport ReceivedMarker from './received-marker.jsx'\n\nimport { fullFormatter } from '../lib/formatters.js';\nimport { sanitizeUrl } from '../lib/utils.js';\nimport HashNavigation from '../lib/navigation.js';\n\n// 4.9 语音未读红点:纯客户端概念,没有对应的后端字段——原生 Tinode 的 recv/read 只标记到\n// \"这条消息本身有没有被看到\",跟\"这条语音有没有被真的点开听过\"是两回事(文字消息看一眼就算\n// 读过,语音消息可能只是划过去、根本没点开播放)。按话题分别记一份\"已播放过的 seq 集合\"在\n// localStorage,跟\"最近使用表情\"是同一类不需要后端参与的本地小状态。\n// Key还要按登录账号分——P2P话题名本身就是对方user_id,跟\"我是谁\"无关;这个应用已知同一浏览器\n// origin下多个账号共享localStorage(多标签页各自登录不同账号),不带uid会导致账号A点开播放过\n// 的语音,在账号B自己与同一个人/同一个群的独立会话里也显示成\"已读\"。\nconst VOICE_PLAYED_KEY_PREFIX = 'im-voice-played:';\nfunction isVoicePlayed(myUid, topic, seq) {\n try {\n const list = JSON.parse(localStorage.getItem(VOICE_PLAYED_KEY_PREFIX + myUid + ':' + topic) || '[]');\n return Array.isArray(list) && list.includes(seq);\n } catch (_) {\n return false;\n }\n}\nfunction markVoicePlayed(myUid, topic, seq) {\n try {\n const key = VOICE_PLAYED_KEY_PREFIX + myUid + ':' + topic;\n const list = JSON.parse(localStorage.getItem(key) || '[]');\n const set = Array.isArray(list) ? list : [];\n if (!set.includes(seq)) {\n // Cap so a very long-lived topic doesn't grow this without bound.\n localStorage.setItem(key, JSON.stringify(set.concat(seq).slice(-500)));\n }\n } catch (_) { /* ignore */ }\n}\n\nclass BaseChatMessage extends React.PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n progress: 0,\n voicePlayed: isVoicePlayed(props.tinode.getCurrentUserID(), props.topic, props.seq),\n invitationBusy: false,\n invitationResult: null,\n invitationError: null\n };\n\n if (props.uploader) {\n props.uploader.onProgress = this.handleProgress.bind(this);\n }\n\n this.handleExpandImage = this.handleExpandImage.bind(this);\n this.handlePlayVideo = this.handlePlayVideo.bind(this);\n this.handleFormButtonClick = this.handleFormButtonClick.bind(this);\n this.handleQuoteClick = this.handleQuoteClick.bind(this);\n this.handleContextClick = this.handleContextClick.bind(this);\n this.handleCancelUpload = this.handleCancelUpload.bind(this);\n this.handleDraftyClick = this.handleDraftyClick.bind(this);\n this.handleVoicePlayed = this.handleVoicePlayed.bind(this);\n this.handleAcceptGroupInvitation = this.handleAcceptGroupInvitation.bind(this);\n\n this.formatterContext = {\n formatMessage: props.intl.formatMessage.bind(props.intl),\n viewportWidth: props.viewportWidth,\n authorizeURL: props.tinode.authorizeURL.bind(props.tinode),\n\n onHandleClick: this.handleDraftyClick,\n // formatters.js's 'AU' case wires this to AudioPlayer's onPlay -- see handleVoicePlayed below\n // for why this needs to live on the instance (closes over this specific message's seq/topic)\n // rather than being a static, prop-derived value like the other formatterContext entries.\n onVoicePlayed: this.handleVoicePlayed\n };\n }\n\n handleDraftyClick = (e, action) => {\n switch (action) {\n case 'image':\n this.handleExpandImage(e);\n break;\n case 'video':\n this.handlePlayVideo(e);\n break;\n case 'form_button':\n this.handleFormButtonClick(e);\n break;\n case 'quote':\n this.handleQuoteClick(e);\n break;\n case 'contact_chat':\n e.preventDefault();\n try {\n // tinode:topic/usr123abc -> usr123abc\n const pathname = new URL(e.target.dataset.val)?.pathname;\n const parts = pathname.split('/').filter(Boolean);\n HashNavigation.navigateTo(HashNavigation.setUrlTopic('', parts.pop() || ''));\n } catch (error) {\n console.error(\"Invalid URL:\", error);\n }\n break;\n case 'contact_find':\n e.preventDefault();\n let hashUrl = HashNavigation.setUrlSidePanel(window.location.hash, 'newtpk');\n hashUrl = HashNavigation.addUrlParam(hashUrl, 'q', e.target.dataset.val);\n hashUrl = HashNavigation.addUrlParam(hashUrl, 'tab', 'find');\n HashNavigation.navigateTo(hashUrl);\n break;\n default:\n // No special handling; let the browser deal with it.\n console.info('Unhandled drafty action.', action, e.target.dataset);\n break;\n }\n }\n\n handleExpandImage(e) {\n e.preventDefault();\n this.props.onExpandMedia({\n url: e.target.src,\n filename: e.target.dataset.name,\n width: e.target.dataset.width,\n height: e.target.dataset.height,\n size: e.target.dataset.size,\n type: e.target.dataset.mime\n });\n }\n\n handlePlayVideo(e) {\n e.preventDefault();\n this.props.onExpandMedia({\n video: true,\n url: e.target.dataset.src,\n preview: e.target.src,\n filename: e.target.dataset.name,\n width: e.target.dataset.width,\n height: e.target.dataset.height,\n duration: e.target.dataset.duration,\n size: e.target.dataset.size,\n type: e.target.dataset.mime\n });\n }\n\n handleFormButtonClick(e) {\n e.preventDefault();\n const data = {\n seq: this.props.seq\n };\n data.resp = {};\n if (e.target.dataset.name) {\n data.resp[e.target.dataset.name] = e.target.dataset.val ? e.target.dataset.val :\n e.target.dataset.val === undefined ? 1 : '' + e.target.dataset.val;\n }\n if (e.target.dataset.act == 'url') {\n data.ref = sanitizeUrl(e.target.dataset.ref) || 'about:blank';\n }\n const text = e.target.dataset.title || 'unknown';\n this.props.onFormResponse(e.target.dataset.act, text, data);\n }\n\n handleContextClick(e) {\n e.preventDefault();\n e.stopPropagation();\n const menuItems = [];\n if (this.props.received == Tinode.MESSAGE_STATUS_FAILED) {\n menuItems.push('menu_item_send_retry');\n }\n if (this.props.received > Tinode.MESSAGE_STATUS_FATAL) {\n if (this.props.userIsWriter) {\n menuItems.push('menu_item_reply');\n if (!this.props.response) {\n let immutable = false;\n Drafty.entities(this.props.content, (_0, _1, tp) => {\n immutable = ['AU', 'EX', 'FM', 'IM', 'TC', 'VC', 'VD'].includes(tp);\n return immutable;\n });\n if (!immutable) {\n Drafty.styles(this.props.content, tp => {\n immutable = ['QQ'].includes(tp);\n return immutable;\n });\n }\n if (!immutable) {\n menuItems.push('menu_item_edit');\n }\n }\n }\n if (this.props.userIsAdmin) {\n menuItems.push(this.props.pinned ? 'menu_item_unpin' : 'menu_item_pin');\n }\n }\n menuItems.push('menu_item_forward');\n\n this.props.showContextMenu({\n seq: this.props.seq,\n replace: this.props.edited ? parseInt(this.props.edited.split(':')[1]) : 0,\n content: this.props.content,\n head: this.props.head,\n userFrom: this.props.userFrom,\n userName: this.props.userName,\n y: e.pageY,\n x: e.pageX,\n pickReply: this.props.pickReply,\n editMessage: this.props.editMessage,\n timestamp: this.props.timestamp,\n }, menuItems);\n }\n\n handleProgress(ratio) {\n this.setState({progress: ratio});\n }\n\n handleCancelUpload() {\n this.props.onCancelUpload(this.props.seq, this.props.uploader);\n }\n\n handleVoicePlayed() {\n if (this.state.voicePlayed) {\n return;\n }\n markVoicePlayed(this.props.tinode.getCurrentUserID(), this.props.topic, this.props.seq);\n this.setState({voicePlayed: true});\n }\n\n handleQuoteClick(e) {\n e.preventDefault();\n e.stopPropagation();\n const replyToSeq = this.props.replyToSeq;\n if (replyToSeq) {\n this.props.onQuoteClick(replyToSeq);\n }\n }\n\n // See the long comment above messages-view.jsx's handleAcceptGroupInvitation for the backstory --\n // this just drives this one message bubble's own busy/done/error display around that call.\n handleAcceptGroupInvitation(invitationId) {\n if (this.state.invitationBusy || this.state.invitationResult || !this.props.onAcceptGroupInvitation) {\n return;\n }\n this.setState({invitationBusy: true, invitationError: null});\n this.props.onAcceptGroupInvitation(invitationId).then(result => {\n this.setState({invitationBusy: false, invitationResult: (result && result.status) || 'joined'});\n }).catch(err => {\n this.setState({invitationBusy: false, invitationError: (err && err.message) || '操作失败,请重试'});\n });\n }\n\n // docs/images/加入群聊.png: a card with the inviter's notice text and a single \"立即加入\" button.\n // Only rendered for the one system_action template that actually carries an actionable\n // `content.actions` entry -- every other system_action/system_notice message keeps falling through\n // to the plain-text path right below, unchanged.\n renderGroupInvitationCard(text, action) {\n const {invitationBusy, invitationResult, invitationError} = this.state;\n return
    \n
    {text}
    \n {invitationResult == 'joined' ? 已加入群聊 :\n invitationResult == 'pending_approval' ? 已提交申请,等待管理员通过 :\n invitationResult ? {invitationResult} :\n }\n {invitationError ? {invitationError} : null}\n
    ;\n }\n\n // Reason caption shown under a failed outgoing message in a 1:1 chat, based on the real\n // relationship state (see docs/images/个人对话—拉黑状态/已读状态.png and .../个人对话—删除状态.png).\n // Returns null for relationships that don't explain a send failure (friend, pending, unknown) so\n // a plain network failure doesn't get a misleading relationship-based caption.\n renderFailReason() {\n if (this.props.response ||\n (this.props.received != Tinode.MESSAGE_STATUS_FAILED && this.props.received != Tinode.MESSAGE_STATUS_FATAL)) {\n return null;\n }\n if (this.props.relationship == 'blocked_by_peer' || this.props.relationship == 'blocked_by_me') {\n return
    消息已发送,但被对方拒收了
    ;\n }\n if (this.props.relationship == 'none') {\n return
    你还不是他(她)朋友。发送朋友验证
    ;\n }\n return null;\n }\n\n render() {\n const sideClass = this.props.sequence + ' ' + (this.props.response ? 'left' : 'right');\n const bubbleClass = (this.props.sequence == 'single' || this.props.sequence == 'last') ? 'bubble tip' : 'bubble';\n const avatar = this.props.userAvatar || true;\n const isFailed = !this.props.response &&\n (this.props.received == Tinode.MESSAGE_STATUS_FAILED || this.props.received == Tinode.MESSAGE_STATUS_FATAL);\n const failReason = this.renderFailReason();\n // 4.9 语音未读红点:只对收到的(response=true)语音消息生效——自己发的语音不需要提醒自己听。\n let isVoiceMessage = false;\n if (this.props.response && this.props.mimeType == Drafty.getContentType() && Drafty.isValid(this.props.content)) {\n Drafty.entities(this.props.content, (_0, _1, tp) => {\n if (tp === 'AU') { isVoiceMessage = true; }\n return isVoiceMessage;\n });\n }\n const showVoiceUnreadDot = isVoiceMessage && !this.state.voicePlayed;\n let textSizeClass = 'message-content';\n const fullDisplay = (this.props.isGroup && this.props.response &&\n (this.props.sequence == 'single' || this.props.sequence == 'last'));\n\n let content = this.props.content;\n // Server-generated conversation notices (`system_notice`, e.g. `friend_added` sent once when two\n // users become friends -- see server's publishIMConversationSystemNotice) and group system-action\n // events (`system_action`, e.g. group_member_joined/join_request_approved/governance changes --\n // server/im_http.go's group event publishers) both carry a custom JSON shape\n // ({template, text, actors/actions, ...}), not Drafty and not a plain string, so without this\n // they fall through to the generic \"invalid content\" placeholder below -- a real, human-readable\n // message like \"有成员通过审批加入了群聊。\" was rendering as a bare warning icon. Reduce either to\n // its `text` upfront so the existing plain-string path renders it as an ordinary bubble -- these\n // are meant to read like a normal message, not a special banner.\n //\n // One template is the exception: `group_invitation_created` (docs/images/加入群聊.png) is the one\n // system_action message that actually carries a real, backend-honored action -- confirmed live\n // against server/im_http.go's serveIMGroupInvitations, content.actions[0] is\n // {type:\"group_invitation_accept\", label:\"立即加入\", target_id:}, and\n // acceptGroupInvitation() already existed in im-api.js with zero call sites because this action\n // data was being thrown away right here along with everything else system_action carries. Collapsing\n // it to bare text (like every other system_action template correctly does) left the invitee with no\n // way to ever accept -- the reference image's whole point is the \"立即加入\" button.\n const systemActions = content && typeof content == 'object' && Array.isArray(content.actions) ? content.actions : null;\n const inviteAction = this.props.head && this.props.head['x-im-type'] === 'system_action' && systemActions &&\n systemActions.find(a => a && a.type === 'group_invitation_accept');\n let invitationCard = null;\n if (inviteAction && typeof content.text == 'string') {\n invitationCard = this.renderGroupInvitationCard(content.text, inviteAction);\n } else if (this.props.head && (this.props.head['x-im-type'] === 'system_notice' || this.props.head['x-im-type'] === 'system_action') &&\n content && typeof content == 'object' && typeof content.text == 'string') {\n content = content.text;\n }\n // 合并转发(服务端 mode=\"bundle\" 生成的消息)同样不是 Drafty,content 是\n // {bundle_id, title, item_count, preview, items, source_refs, comment}。不认这个类型的话\n // 一样会落到下面的 \"invalid content\" 兜底。渲染成一张可展开的\"聊天记录\"卡片。\n let bundleCard = null;\n if (this.props.head && this.props.head['x-im-type'] === 'forward_bundle' &&\n content && typeof content == 'object' && (content.items || content.preview)) {\n bundleCard = ;\n }\n const attachments = [];\n if (this.props.mimeType == Drafty.getContentType() && Drafty.isValid(content)) {\n Drafty.attachments(content, (att, i) => {\n if (Drafty.isFormResponseType(att.mime)) {\n // Don't show json drafty form response objects as attachments.\n // They are not meant for users.\n return;\n }\n attachments.push();\n }, this);\n const tree = Drafty.format(content, fullFormatter, this.formatterContext);\n content = React.createElement(React.Fragment, null, tree);\n } else if (typeof content == 'string') {\n // Make font bigger for emoji-only messages.\n // Must use 'new RegExp(...)' because React does not like /{1-5}/.\n if (new RegExp('^\\\\p{RGI_Emoji}{1,5}$', 'v').test(content || '')) {\n // Content consists of 1-5 emoji characters. Count how many and use it to increase the font size.\n textSizeClass += ' emoji-' + (content || '').match(/\\p{RGI_Emoji}/vg).length;\n }\n } else {\n content = <>warning_amber \n \n }\n\n return (\n
  • \n {this.props.selectMode ?\n this.props.onToggleSelect(this.props.seq)}>\n {this.props.selected ? 'check_circle' : 'radio_button_unchecked'}\n : null}\n {this.props.isGroup && this.props.response ?\n
    \n {fullDisplay ?\n :\n null}\n
    :\n null}\n {isFailed && failReason ?\n error : null}\n
    \n
    \n {showVoiceUnreadDot ? : null}\n
    \n
    \n {invitationCard || bundleCard || content}\n {attachments}\n
    \n {this.props.timestamp ?\n \n : null}\n
    \n {this.props.showContextMenu && !this.props.selectMode ?\n \n \n expand_more\n \n : null\n }\n
    \n {failReason}\n {fullDisplay ?\n
    \n {this.props.userName ||\n \n }\n {this.props.senderRole == 'owner' ? 群主 :\n this.props.senderRole == 'admin' ? 管理员 : null}\n
    \n : null\n }\n
    \n
  • \n );\n }\n};\n\nconst IntlChatMessage = injectIntl(BaseChatMessage);\nconst ChatMessage = React.forwardRef((props, ref) => );\n\nexport default ChatMessage;\n","// 合并转发卡片(第4章 4.20)。\n//\n// 服务端在 `POST /v1/im/messages/forward` 的 mode=\"bundle\" 下会生成一条消息,\n// head 带 `x-im-type: \"forward_bundle\"`,content 形如:\n// {bundle_id, title, item_count, preview:[{from,type,summary,ts}], items:[...], source_refs, comment}\n// 这个结构不是 Drafty,所以不加这个渲染的话会落到 chat-message 的 \"invalid content\" 兜底。\n//\n// items[] 里已经带了每条被转发消息的完整快照,所以\"查看完整记录\"是就地展开,不需要额外请求。\nimport React from 'react';\n\n// 快照里的 from 是不带 usr 前缀的裸 uid(与收藏快照一致)。先补前缀再查本地会话缓存拿显示名,\n// 查不到就不显示发送者——宁可少一行,也不要把一串 uid 摆在摘要前面。\nfunction senderName(tinode, from) {\n const raw = (from || '').trim();\n if (!raw) return '';\n const uid = raw.startsWith('usr') ? raw : 'usr' + raw;\n const topic = tinode && tinode.getTopic ? tinode.getTopic(uid) : null;\n const pub = topic && topic.public;\n return (pub && (pub.fn || pub.name)) || '';\n}\n\nconst TYPE_LABEL = {image: '[图片]', video: '[视频]', voice: '[语音]', file: '[文件]', link: '[链接]'};\n\nfunction lineText(entry) {\n if (!entry) return '';\n const summary = (entry.summary || entry.text || '').trim();\n if (summary) return summary;\n return TYPE_LABEL[entry.type] || '';\n}\n\nexport default class ForwardBundle extends React.PureComponent {\n constructor(props) {\n super(props);\n this.state = {expanded: false};\n this.handleToggle = this.handleToggle.bind(this);\n }\n\n handleToggle(e) {\n e.preventDefault();\n e.stopPropagation();\n this.setState(s => ({expanded: !s.expanded}));\n }\n\n render() {\n const c = this.props.content || {};\n const count = Number(c.item_count) || (Array.isArray(c.items) ? c.items.length : 0);\n // 收起时用 preview(服务端已截到最多 3 条);展开时用 items(全量)。\n const rows = this.state.expanded ? (c.items || []) : (c.preview || []);\n const comment = (c.comment || '').trim();\n\n return
    \n
    {c.title || '聊天记录'}
    \n
      \n {rows.map((entry, i) => {\n const who = senderName(this.props.tinode, entry.from);\n return
    • \n {who ? {who}: : null}{lineText(entry)}\n
    • ;\n })}\n
    \n {count > rows.length || this.state.expanded ?\n :\n
    共 {count} 条消息
    }\n {comment ?
    {comment}
    : null}\n
    ;\n }\n}\n","// GroupSubs: a list of group subscribers currently online.\n// Show in the topic title bar\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { MAX_ONLINE_IN_TOPIC } from '../config.js'\n\nimport LetterTile from './letter-tile.jsx';\nimport { makeImageUrl } from '../lib/blob-helpers.js';\n\nexport default class GroupSubs extends React.Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n const usersOnline = [];\n const totalCount = (this.props.subscribers || []).length;\n const countToShow = Math.min(MAX_ONLINE_IN_TOPIC, totalCount);\n\n (this.props.subscribers || []).some((sub) => {\n usersOnline.push(\n
    \n \n
    \n );\n return usersOnline.length == countToShow;\n });\n if (usersOnline.length == 0) {\n return null;\n }\n return (\n
    {usersOnline} {totalCount > countToShow ?\n \n \n : null}\n
    \n );\n }\n};\n","// A single topic or user.\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nexport default class Invitation extends React.PureComponent {\n constructor(props) {\n super(props);\n\n this.handleButtonAction = this.handleButtonAction.bind(this);\n }\n\n handleButtonAction(evt, data) {\n evt.preventDefault();\n this.props.onAction(data);\n }\n\n render() {\n return (\n
    \n
    \n \n
    \n
    \n \n \n \n
    \n
    \n );\n }\n};\n","// Message bubble with non-payload content, such as an indicator of deleted content or a date stamp.\n\nimport React from 'react';\n\nexport default class MetaMessage extends React.PureComponent {\n constructor(props) {\n super(props);\n }\n\n render() {\n let content = null;\n let bubbleClass = 'bubble';\n if (this.props.date) {\n // A date badge.\n content = <>{this.props.date}\n bubbleClass += ' date';\n } else if (this.props.deleted) {\n // 撤回/删除占位。messages-view.jsx 对 msg.hi 的消息一直在传 deleted={true},但这里从来\n // 没有处理过这个分支,于是整个组件走到下面的 `return null` —— 撤回一条消息之后时间线上\n // 什么都不剩,看不出这里曾经有过一条消息。文案复用已有的 message_deleted(\"消息已删除\")。\n content = {this.props.deletedText || '消息已删除'};\n bubbleClass += ' deleted';\n } else if (this.props.systemText) {\n // docs/images/内容沟通对话3-开启进群验证与拉人状态.png:群系统事件(成员加入/退出/角色变更/\n // 群公告发布等)在参考图里是居中的纯灰字,不带头像、不带气泡、不带发送者名字——跟这里的\n // 日期分隔条是同一种视觉语言。这类消息之前是当成普通消息交给 ChatMessage 渲染的(服务端\n // 这类消息没有真实的 `from`,chat-message.jsx 的 fullDisplay 逻辑因此在系统消息下方多画出\n // 一行解析不到发送者、回退成\"未找到\"的作者名,明显不该出现)。\n content = {this.props.systemText};\n bubbleClass += ' system';\n }\n\n if (!content) {\n return <>{null}\n }\n\n return (\n
  • \n
    \n
    \n {content}\n
    \n
    \n
  • \n );\n }\n};\n","// Send message form.\nimport React from 'react';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport { Drafty } from 'tinode-sdk';\n\nimport { previewFormatter } from '../lib/formatters.js';\nimport { MIN_SWIPE_DISTANCE } from '../config.js';\n\nconst messages = defineMessages({\n message_not_found: {\n id: 'message_not_found',\n defaultMessage: 'message not found',\n description: 'Pinned message is not found'\n },\n message_deleted: {\n id: 'message_deleted',\n defaultMessage: 'message deleted',\n description: 'Pinned message is deleted'\n }\n});\n\nclass PinnedMessages extends React.PureComponent {\n constructor(props) {\n super(props);\n\n // Starting location of the touch gesture.\n this.touchX = null;\n this.touchY = null;\n\n this.touchSurface = React.createRef();\n\n this.getSelectedIndex = this.getSelectedIndex.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.handleSelected = this.handleSelected.bind(this);\n this.handleMoveNext = this.handleMoveNext.bind(this);\n this.handleMovePrev = this.handleMovePrev.bind(this);\n this.handleTouchEventStart = this.handleTouchEventStart.bind(this);\n this.handleTouchEventEnd = this.handleTouchEventEnd.bind(this);\n this.handleTouchCancel = this.handleTouchCancel.bind(this);\n }\n\n componentDidMount() {\n this.touchSurface.current.addEventListener('touchstart', this.handleTouchEventStart, {passive: true});\n this.touchSurface.current.addEventListener('touchend', this.handleTouchEventEnd, {passive: true});\n this.touchSurface.current.addEventListener('touchcancel', this.handleTouchCancel, {passive: true});\n }\n\n componentWillUnmount() {\n this.touchSurface.current.removeEventListener('touchstart', this.handleTouchEventStart);\n this.touchSurface.current.removeEventListener('touchend', this.handleTouchEventEnd);\n this.touchSurface.current.removeEventListener('touchcancel', this.handleTouchCancel);\n }\n getSelectedIndex() {\n const list = (this.props.pins || []);\n return list.length - this.props.selected - 1;\n }\n\n handleCancel(e) {\n e.preventDefault();\n this.props.onCancel(this.props.pins[this.getSelectedIndex()]);\n }\n\n handleSelected(e) {\n e.preventDefault();\n this.props.onSelected(this.props.pins[this.getSelectedIndex()]);\n }\n\n handleMoveNext(e, isTouch) {\n // Don't call preventDefault for touch events.\n isTouch || e.preventDefault();\n e.stopPropagation();\n const idx = Math.max(this.props.selected - 1, 0);\n if (idx != this.props.selected) {\n this.props.setSelected(idx);\n }\n }\n\n handleMovePrev(e, isTouch) {\n // Don't call preventDefault for touch events.\n isTouch || e.preventDefault();\n e.stopPropagation();\n const idx = Math.min(this.props.selected + 1, (this.props.pins || []).length - 1);\n if (idx != this.props.selected) {\n this.props.setSelected(idx);\n }\n }\n\n handleTouchEventStart(e) {\n if (e.touches.length == 1) {\n this.touchX = e.touches[0].clientX;\n this.touchY = e.touches[0].clientY;\n }\n }\n\n handleTouchEventEnd(e) {\n if (this.touchX === null || e.changedTouches.length != 1) {\n this.touchX = null;\n return;\n }\n\n const dX = this.touchX - e.changedTouches[0].clientX;\n const dY = this.touchY - e.changedTouches[0].clientY;\n this.touchX = null;\n\n if (Math.abs(dX) > Math.abs(dY) || Math.abs(dY) < MIN_SWIPE_DISTANCE) {\n // Horizontal swipe or too short vertical swipe.\n return;\n }\n\n if (dY > 0) {\n this.handleMovePrev(e, true);\n } else {\n this.handleMoveNext(e, true);\n }\n }\n\n handleTouchCancel() {\n this.touchX = null;\n }\n\n render() {\n const selected = this.getSelectedIndex();\n let messageShown = (this.props.messages || [])[selected];\n messageShown = messageShown ?\n messageShown._deleted ?\n {this.props.intl.formatMessage(messages.message_deleted)}\n :\n Drafty.format(messageShown.content, previewFormatter, {\n formatMessage: this.props.intl.formatMessage.bind(this.props.intl),\n authorizeURL: this.props.tinode.authorizeURL.bind(this.props.tinode)\n })\n :\n {this.props.intl.formatMessage(messages.message_not_found)};\n\n const dots = [];\n this.props.pins.forEach(seq => {\n const cn = dots.length == selected ? 'adot' : 'dot';\n dots.push(
    );\n });\n\n return (\n
    \n {this.props.isAdmin ?\n
    \n close\n
    :\n
    push_pin
    \n }\n
    {dots}
    \n

    {messageShown}

    \n
    \n \n {selected > 0 ?\n \n expand_less\n \n : null\n }\n \n \n {this.props.selected > 0 ?\n \n expand_more\n \n : null\n }\n \n
    \n
    \n );\n }\n}\n\nexport default injectIntl(PinnedMessages);\n","// Received/read indicator.\nimport React from 'react';\nimport { defineMessages, injectIntl } from 'react-intl';\n\nimport { Tinode } from 'tinode-sdk';\n\nimport { deliveryMarker } from '../lib/utils.js';\n\nconst messages = defineMessages({\n message_sending: {\n id: 'message_sending',\n defaultMessage: 'sending...',\n description: 'Message being sent, in place of time stamp'\n },\n message_sending_failed: {\n id: 'message_sending_failed',\n defaultMessage: 'failed',\n description: 'Failed to send message, in place of time stamp'\n },\n message_edited_marker: {\n id: 'message_edited_marker',\n defaultMessage: ', edited',\n description: 'Marker indicating that the message was edited'\n }\n});\n\nclass ReceivedMarker extends React.PureComponent {\n render() {\n const {formatMessage} = this.props.intl;\n let timestamp;\n if (this.props.received <= Tinode.MESSAGE_STATUS_SENDING) {\n timestamp = formatMessage(messages.message_sending);\n } else if (this.props.received == Tinode.MESSAGE_STATUS_FAILED ||\n this.props.received == Tinode.MESSAGE_STATUS_FATAL) {\n timestamp = formatMessage(messages.message_sending_failed);\n } else {\n timestamp = this.props.timestamp.toLocaleTimeString(this.props.intl.locale, { timeStyle: 'short' });\n }\n\n const icon = deliveryMarker(this.props.received);\n // icon.color is only set for the failed/read cases (deliveryMarker's other {name} results omit\n // the key entirely) -- string-concatenating it unconditionally put the literal text \"undefined\"\n // into the className for sending/sent/received messages.\n const marker = icon ? {icon.name} : null;\n const edited = this.props.edited ? formatMessage(messages.message_edited_marker) : null;\n\n return (\n \n {timestamp}{edited}{'\\u00a0'}{marker}\n \n );\n }\n};\n\nexport default injectIntl(ReceivedMarker);\n","// Send message form.\nimport React, { Suspense } from 'react';\nimport { FormattedMessage, defineMessages, injectIntl } from 'react-intl';\nimport { Drafty, TheCard } from 'tinode-sdk';\n\n// Lazy-loading AudioRecorder because it's quite large due to\n// a dependency on webm-duration-fix.\nconst AudioRecorder = React.lazy(_ => import('./audio-recorder.jsx'));\n\nimport { KEYPRESS_DELAY } from '../config.js';\nimport { filePasted } from '../lib/blob-helpers.js';\nimport { replyFormatter } from '../lib/formatters.js';\nimport { forwardFavorites, getFavorites, getFileUrl, getFriends, translateReason } from '../lib/im-api.js';\n\n// 4.5-4.6 表情面板:参考图确认了\"只有2个tab\"(😊表情 / ♡)和\"发送按钮浅蓝禁用、深蓝启用\"这两点,\n// 但没有任何一张图能看清第二个tab具体展示什么内容——判断为\"常用\"(这是这类两tab设计里最常见的\n// 语义,也是本项目其它地方唯一有本地存储依据能撑起来的一种:不存在一个真实的\"收藏表情\"后端概念)。\n// 表情本身的具体清单——纠正一处之前的误判:参考图`表情包展开(发送按钮默认状态).png`/`表情包\n// 发送页面.png`其实清楚画出了一套具体的经典\"黄脸\"贴图(微信/QQ经典表情那种视觉风格),不是没有\n// 图片依据。只是这个项目没有对应的贴图素材资源,做不到跟截图完全一致的视觉,退而求其次选了一组\n// 常见、覆盖面广的系统 Unicode 表情——这是素材缺口下的折中方案,不是\"没有依据、随便选的\"。\nconst EMOJI_LIST = ['😀', '😁', '😂', '🤣', '😃', '😄', '😅', '😆', '😉', '😊', '😋', '😎', '😍', '😘',\n '🥰', '😗', '😙', '😚', '🙂', '🤗', '🤩', '🤔', '🤨', '😐', '😑', '😶', '🙄', '😏', '😣', '😥', '😮',\n '🤐', '😯', '😪', '😫', '🥱', '😴', '😌', '😛', '😜', '😝', '🤤', '😒', '😓', '😔', '😕', '🙃', '🤑',\n '😲', '☹️', '🙁', '😖', '😞', '😟', '😤', '😢', '😭', '😦', '😧', '😨', '😩', '🤯', '😬', '😰', '😱',\n '🥵', '🥶', '😳', '🤪', '😵', '😡', '😠', '🤬', '😷', '🤒', '🤕', '🤢', '🤮', '🥳', '🥴', '🥺', '🤫',\n '🤭', '🧐', '🤓', '😈', '👿', '👍', '👎', '👏', '🙌', '🤝', '🙏', '💪', '❤️', '🧡', '💛', '💚', '💙',\n '💜', '🖤', '💔', '💕', '💯', '🔥', '🎉', '🎂', '🌹', '☀️', '🌙', '⭐'];\n// 跟 content-library-view.jsx 的 TYPE_LABEL 是同一套值(那边是 view 层,这边是 widget,不方便\n// 互相 import,就近各自维护一份小常量)。收藏摘要要优先读 snapshot.content.txt 这个结构化字段,\n// 不能像最初那版一样直接展示 snapshot.text——那是整条 content 原样 JSON.stringify 的结果\n// (例如 {\"txt\":\"...\"}),不是给人看的,之前联调时真被这个坑绊了一次才发现。\nconst FAVORITE_TYPE_LABEL = {image: '[图片]', video: '[视频]', voice: '[语音]', file: '[文件]', link: '[链接]', text: '[文本]'};\nfunction favoriteSummary(item) {\n // image/video/voice favorites' snapshot.content.txt is a placeholder single space in this\n // project's convention (confirmed via a real GET /favorites response) -- reading it as the\n // summary showed a blank line instead of a type label for these three types.\n if (item.type === 'image' || item.type === 'video' || item.type === 'voice') {\n return FAVORITE_TYPE_LABEL[item.type];\n }\n const content = item.snapshot && item.snapshot.content;\n // A text favorite's snapshot.content is a plain string, not a {txt:...} Drafty object --\n // content.txt on it is undefined, which used to fall through all the way to the internal\n // item.type value (\"text\") being shown to the user verbatim.\n if (typeof content === 'string' && content.trim()) return content;\n if (content && typeof content.txt === 'string' && content.txt.trim()) return content.txt;\n return FAVORITE_TYPE_LABEL[item.type] || item.type || item.favorite_id;\n}\nconst RECENT_EMOJI_KEY = 'im-recent-emoji';\nconst MAX_RECENT_EMOJI = 30;\nfunction loadRecentEmoji() {\n try {\n const raw = JSON.parse(localStorage.getItem(RECENT_EMOJI_KEY) || '[]');\n return Array.isArray(raw) ? raw : [];\n } catch (_) {\n return [];\n }\n}\nfunction pushRecentEmoji(emoji) {\n try {\n const list = [emoji].concat(loadRecentEmoji().filter(e => e !== emoji)).slice(0, MAX_RECENT_EMOJI);\n localStorage.setItem(RECENT_EMOJI_KEY, JSON.stringify(list));\n } catch (_) { /* ignore */ }\n}\n\nconst messages = defineMessages({\n messaging_disabled: {\n id: 'messaging_disabled_prompt',\n defaultMessage: 'Messaging disabled',\n description: 'Prompt in SendMessage in read-only topic'\n },\n type_new_message: {\n id: 'new_message_prompt',\n defaultMessage: 'New message',\n description: 'Prompt in send message field'\n },\n add_image_caption: {\n id: 'image_caption_prompt',\n defaultMessage: 'Image caption',\n description: 'Prompt in SendMessage for attached image'\n },\n file_attachment_too_large: {\n id: 'file_attachment_too_large',\n defaultMessage: 'The file size {size} exceeds the {limit} limit.',\n description: 'Error message when attachment is too large'\n },\n cannot_initiate_upload: {\n id: 'cannot_initiate_file_upload',\n defaultMessage: 'Cannot initiate file upload.',\n description: 'Generic error messagewhen attachment fails'\n },\n icon_title_record_voice: {\n id: 'icon_title_record_voice',\n defaultMessage: 'Record voice message',\n description: 'Icon tool tip for recording a voice message'\n },\n icon_title_attach_file: {\n id: 'icon_title_attach_file',\n defaultMessage: 'Attach file',\n description: 'Icon tool tip for attaching a file'\n },\n icon_title_add_image: {\n id: 'icon_title_add_image',\n defaultMessage: 'Add image',\n description: 'Icon tool tip for attaching an image'\n },\n icon_title_send: {\n id: 'icon_title_send',\n defaultMessage: 'Send message',\n description: 'Icon tool tip for sending a message'\n },\n});\n\nclass SendMessage extends React.PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n quote: null,\n message: '',\n audioRec: false,\n audioAvailable: !!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia),\n // @提醒选择器:mentionQuery 非 null 时显示面板;mentionStart 是触发这次匹配的\"@\"在\n // message 里的字符下标(不是 fmt/grapheme 下标,纯 JS 字符串下标,跟 slice 配对用)。\n mentionQuery: null,\n mentionResults: [],\n mentionHighlight: 0,\n emojiOpen: false,\n emojiTab: 'emoji',\n recentEmoji: loadRecentEmoji(),\n attachOpen: false,\n cardPicker: null,\n favPicker: null,\n audioCancelling: false,\n };\n\n // Timestamp when the previous key press was sent to the server.\n this.keypressTimestamp = 0;\n\n this.handlePasteEvent = this.handlePasteEvent.bind(this);\n this.handleAttachImage = this.handleAttachImage.bind(this);\n this.handleAttachFile = this.handleAttachFile.bind(this);\n this.handleAttachAudio = this.handleAttachAudio.bind(this);\n this.handleSend = this.handleSend.bind(this);\n this.handleKeyPress = this.handleKeyPress.bind(this);\n this.handleMessageTyping = this.handleMessageTyping.bind(this);\n this.handleDropAttach = this.handleDropAttach.bind(this);\n\n this.handleQuoteClick = this.handleQuoteClick.bind(this);\n this.selectMention = this.selectMention.bind(this);\n this.startHoldRecording = this.startHoldRecording.bind(this);\n this.handleHoldMove = this.handleHoldMove.bind(this);\n this.endHoldRecording = this.endHoldRecording.bind(this);\n this.handleHoldVisibilityChange = this.handleHoldVisibilityChange.bind(this);\n this.toggleEmojiPanel = this.toggleEmojiPanel.bind(this);\n this.insertEmoji = this.insertEmoji.bind(this);\n this.deleteLastChar = this.deleteLastChar.bind(this);\n this.toggleAttachPanel = this.toggleAttachPanel.bind(this);\n this.openCardPicker = this.openCardPicker.bind(this);\n this.openFavPicker = this.openFavPicker.bind(this);\n this.sendCard = this.sendCard.bind(this);\n this.sendFavorite = this.sendFavorite.bind(this);\n\n this.formatReply = this.formatReply.bind(this);\n }\n\n componentDidMount() {\n if (this.messageEditArea) {\n this.messageEditArea.addEventListener('paste', this.handlePasteEvent, false);\n if (window.getComputedStyle(this.messageEditArea).getPropertyValue('transition-property') == 'all') {\n // Set focus on desktop, but not on mobile: focus causes soft keyboard to pop up.\n this.messageEditArea.focus();\n }\n }\n\n this.setState({quote: this.formatReply()});\n }\n\n componentWillUnmount() {\n if (this.messageEditArea) {\n this.messageEditArea.removeEventListener('paste', this.handlePasteEvent, false);\n }\n if (this.mentionSearchTimer) {\n window.clearTimeout(this.mentionSearchTimer);\n }\n window.removeEventListener('mousemove', this.handleHoldMove);\n window.removeEventListener('mouseup', this.endHoldRecording);\n window.removeEventListener('touchmove', this.handleHoldMove);\n window.removeEventListener('touchend', this.endHoldRecording);\n window.removeEventListener('blur', this.endHoldRecording);\n document.removeEventListener('visibilitychange', this.handleHoldVisibilityChange);\n }\n\n componentDidUpdate(prevProps) {\n if (this.messageEditArea) {\n if (window.getComputedStyle(this.messageEditArea).getPropertyValue('transition-property') == 'all') {\n // Set focus on desktop, but not on mobile: focus causes soft keyboard to pop up.\n this.messageEditArea.focus();\n }\n\n // Adjust height of the message area for the amount of text.\n this.messageEditArea.style.height = '0px';\n this.messageEditArea.style.height = this.messageEditArea.scrollHeight + 'px';\n }\n\n if (prevProps.topicName != this.props.topicName) {\n this.setState({message: this.props.initMessage || '', audioRec: false, quote: null, mentionQuery: null,\n mentionResults: [], emojiOpen: false, attachOpen: false, cardPicker: null, favPicker: null});\n } else if (!prevProps.disabled && this.props.disabled && this.state.audioRec) {\n // isWriter/etc are real-time ACS bits (messages-view.jsx re-derives them from {pres}/{meta}),\n // so `disabled` can flip to true mid-recording -- the other party blocking you, being removed\n // from a group, or getting muted, all without the user releasing the hold-to-talk button first.\n // Unmounting here (rather than leaving it mounted under a now-hidden branch)\n // is what actually stops the mic via its componentWillUnmount; without this the recording just\n // sits there with `disabled` true and no surviving UI able to end it, and if `disabled` later\n // reverts to false in the same topic, this stale `true` would remount a fresh \n // with no user gesture at all -- silently starting to record again on its own.\n //\n // By the time this runs, React has already committed the `disabled` render and unmounted\n // (its ref callback nulled this.audioRecorderInstance), so endHoldRecording()'s\n // own handleDone/handleDelete call is a no-op here -- it's called anyway for the six\n // mousemove/mouseup/touchmove/touchend/blur/visibilitychange listeners startHoldRecording\n // registered on window/document, which endHoldRecording always removes unconditionally\n // regardless of whether the recorder instance is still around. Skipping this left them\n // dangling until the next real mouseup/touchend/blur/tab-switch happened to fire.\n this.endHoldRecording();\n this.setState({audioRec: false});\n } else if (prevProps.initMessage != this.props.initMessage) {\n const msg = this.props.initMessage || '';\n this.setState({message: msg}, _ => {\n // messageEditArea can be null here: initMessage (draft/edit content) can change while the\n // textarea itself is unmounted, e.g. noInput during an active forward, or disabled while\n // ACS is still resolving right after a topic switch.\n if (this.messageEditArea) {\n // If there is text, scroll to bottom and set caret to the end.\n this.messageEditArea.scrollTop = this.messageEditArea.scrollHeight;\n this.messageEditArea.setSelectionRange(msg.length, msg.length);\n }\n });\n }\n if (prevProps.reply != this.props.reply) {\n this.setState({quote: this.formatReply()});\n }\n }\n\n formatReply() {\n return this.props.reply ?\n Drafty.format(this.props.reply.content, replyFormatter, {\n formatMessage: this.props.intl.formatMessage.bind(this.props.intl),\n authorizeURL: this.props.tinode.authorizeURL.bind(this.props.tinode)\n }) : null;\n }\n\n handlePasteEvent(e) {\n if (this.props.disabled) {\n return;\n }\n // onAttachImage/onAttachFile are explicitly null while forwarding a message\n // (messages-view.jsx) -- pasting a file in that state used to throw\n // \"onAttachImage is not a function\" instead of just not attaching anything.\n // FIXME: handle large files too.\n if (filePasted(e,\n file => { if (this.props.onAttachImage) { this.props.onAttachImage(file); } },\n file => { if (this.props.onAttachFile) { this.props.onAttachFile(file); } },\n this.props.onError)) {\n\n // If a file was pasted, don't paste base64 data into input field.\n e.preventDefault();\n }\n }\n\n handleAttachImage(e) {\n if (e.target.files && e.target.files.length > 0 && this.props.onAttachImage) {\n this.props.onAttachImage(e.target.files[0]);\n }\n // Clear the value so the same file can be uploaded again.\n e.target.value = '';\n }\n\n handleAttachFile(e) {\n if (e.target.files && e.target.files.length > 0 && this.props.onAttachFile) {\n this.props.onAttachFile(e.target.files[0]);\n }\n // Clear the value so the same file can be uploaded again.\n e.target.value = '';\n }\n\n handleDropAttach(files) {\n if (files && files.length > 0 && this.props.onAttachFile) {\n this.props.onAttachFile(files[0]);\n }\n }\n\n handleAttachAudio(url, preview, duration) {\n this.setState({audioRec: false});\n if (this.props.onAttachAudio) {\n this.props.onAttachAudio(url, preview, duration);\n }\n }\n\n handleSend(e) {\n e.preventDefault();\n const message = this.state.message.trim();\n if (message || this.props.acceptBlank || this.props.noInput) {\n const result = this.props.onSendMessage(message);\n // onSendMessage may return a promise resolving to `false` when a pre-send risk check blocked\n // or the user cancelled it -- in that case keep the composer text so nothing typed is lost.\n if (result && typeof result.then == 'function') {\n result.then(sent => { if (sent !== false) this.setState({message: ''}); });\n } else {\n this.setState({message: ''});\n }\n }\n }\n\n /* Send on Enter key */\n handleKeyPress(e) {\n if (this.state.audioRec) {\n // Ignore key presses while audio is being recorded.\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n if (this.state.mentionQuery != null) {\n if (e.key === 'Escape') {\n e.preventDefault();\n this.setState({mentionQuery: null, mentionResults: []});\n return;\n }\n if (this.state.mentionResults.length > 0 && (e.key === 'ArrowDown' || e.key === 'ArrowUp')) {\n e.preventDefault();\n const delta = e.key === 'ArrowDown' ? 1 : -1;\n const count = this.state.mentionResults.length;\n this.setState({mentionHighlight: (this.state.mentionHighlight + delta + count) % count});\n return;\n }\n if (e.key === 'Enter' && this.state.mentionResults.length > 0) {\n e.preventDefault();\n e.stopPropagation();\n this.selectMention(this.state.mentionResults[this.state.mentionHighlight]);\n return;\n }\n }\n\n // Enter pressed: either send, or enter a new line.\n if (e.key === 'Enter') {\n if (this.props.sendOnEnter == 'plain') {\n // Have Shift-Enter insert a line break instead\n if (!e.shiftKey) {\n e.preventDefault();\n e.stopPropagation();\n\n this.handleSend(e);\n }\n } else {\n if (e.ctrlKey || e.metaKey) {\n e.preventDefault();\n e.stopPropagation();\n\n this.handleSend(e);\n }\n }\n }\n }\n\n handleMessageTyping(e) {\n this.setState({message: e.target.value});\n this.updateMentionState(e.target.value, e.target.selectionStart);\n if (this.props.onMessageChange) {\n this.props.onMessageChange(e.target.value);\n }\n if (this.props.onKeyPress) {\n const now = new Date().getTime();\n if (now - this.keypressTimestamp > KEYPRESS_DELAY) {\n this.props.onKeyPress();\n this.keypressTimestamp = now;\n }\n }\n }\n\n // 4.2-4.3 @提醒:只在群聊里挂 onMentionSearch(messages-view.jsx 只给群话题传这个 prop)。\n // 触发条件是\"光标前最近一个'@','@'前面是空白或整段开头,'@'和光标之间没有空白\"——这样\n // \"联系xx@xx.com\"这种邮箱场景里的@不会被误当成提醒触发。\n updateMentionState(text, caret) {\n if (!this.props.onMentionSearch || caret == null) {\n return;\n }\n const before = text.slice(0, caret);\n const match = /(?:^|\\s)@([^\\s@]*)$/.exec(before);\n if (!match) {\n if (this.state.mentionQuery != null) {\n this.setState({mentionQuery: null, mentionResults: []});\n }\n return;\n }\n const query = match[1];\n const start = caret - query.length - 1;\n this.setState({mentionQuery: query, mentionStart: start, mentionHighlight: 0});\n if (this.mentionSearchTimer) {\n window.clearTimeout(this.mentionSearchTimer);\n }\n this.mentionSearchTimer = window.setTimeout(() => {\n this.props.onMentionSearch(query).then(results => {\n // mentionQuery may have moved on (user kept typing, or closed the picker) by the time this\n // resolves -- only apply it if we're still showing a picker at all, matching the same\n // stale-response guard used everywhere else responses race state.\n if (this.state.mentionQuery != null) {\n this.setState({mentionResults: results || []});\n }\n }).catch(() => {});\n }, 200);\n }\n\n selectMention(item) {\n const {message, mentionStart, mentionQuery} = this.state;\n if (mentionStart == null || mentionQuery == null) {\n return;\n }\n const name = item.group_nickname || item.display_name || item.user_id;\n const insertion = '@' + name + ' ';\n const end = mentionStart + 1 + mentionQuery.length;\n const newMessage = message.slice(0, mentionStart) + insertion + message.slice(end);\n const caretPos = mentionStart + insertion.length;\n this.setState({message: newMessage, mentionQuery: null, mentionResults: []});\n if (this.props.onMentionSelected) {\n this.props.onMentionSelected(item.user_id, name);\n }\n if (this.props.onMessageChange) {\n this.props.onMessageChange(newMessage);\n }\n // Textarea's own DOM value needs the same update -- setState alone re-renders with the right\n // `value` prop, but the caret placement below needs the element's real value/selection to\n // already match, and doing it in the same tick (rather than waiting on the render) avoids a\n // visible flash of the stale text with the caret in the wrong place.\n requestAnimationFrame(() => {\n if (this.messageEditArea) {\n this.messageEditArea.focus();\n this.messageEditArea.setSelectionRange(caretPos, caretPos);\n }\n });\n }\n\n handleQuoteClick(e) {\n e.preventDefault();\n e.stopPropagation();\n if (this.props.reply && this.props.onQuoteClick) {\n const replyToSeq = this.props.reply.seq;\n this.props.onQuoteClick(replyToSeq);\n }\n }\n\n // 组合面板图标切换规律(核对图片确认):表情/附件两个入口固定在输入框右侧;哪个面板当前\n // 展开,对应的那个图标就变成\"⌨\"(点击收起换回键盘),另一个保持原样不变——不是两个一起变。\n // 这里只做了表情这一侧,附件面板(4.13/4.9-4.14)另外接线时要遵守同一条规则,不要各自发明。\n toggleEmojiPanel(e) {\n e.preventDefault();\n this.setState(s => ({emojiOpen: !s.emojiOpen, attachOpen: false, audioRec: false}));\n }\n\n insertEmoji(emoji) {\n const ta = this.messageEditArea;\n const start = ta ? ta.selectionStart : this.state.message.length;\n const end = ta ? ta.selectionEnd : this.state.message.length;\n const newMessage = this.state.message.slice(0, start) + emoji + this.state.message.slice(end);\n pushRecentEmoji(emoji);\n this.setState({message: newMessage, recentEmoji: loadRecentEmoji()});\n if (this.props.onMessageChange) {\n this.props.onMessageChange(newMessage);\n }\n const caretPosEmoji = start + emoji.length;\n requestAnimationFrame(() => {\n if (this.messageEditArea) {\n this.messageEditArea.focus();\n this.messageEditArea.setSelectionRange(caretPosEmoji, caretPosEmoji);\n }\n });\n }\n\n // 参考图的表情面板自带一个退格键,让\"只点表情不碰键盘\"这条路径也能删掉打错的字符——用\n // Array.from 而不是 slice(0,-1) 切最后一个 Unicode 码点,避免把一个占两个UTF-16码元的emoji\n // (比如复合肤色/家庭类emoji)齐腰斩断,删出半个乱码字符。\n deleteLastChar() {\n const ta = this.messageEditArea;\n const start = ta ? ta.selectionStart : this.state.message.length;\n const end = ta ? ta.selectionEnd : this.state.message.length;\n let newMessage, caretPos;\n if (start !== end) {\n newMessage = this.state.message.slice(0, start) + this.state.message.slice(end);\n caretPos = start;\n } else if (start > 0) {\n const before = Array.from(this.state.message.slice(0, start));\n before.pop();\n newMessage = before.join('') + this.state.message.slice(start);\n caretPos = before.join('').length;\n } else {\n return;\n }\n this.setState({message: newMessage});\n if (this.props.onMessageChange) {\n this.props.onMessageChange(newMessage);\n }\n requestAnimationFrame(() => {\n if (this.messageEditArea) {\n this.messageEditArea.focus();\n this.messageEditArea.setSelectionRange(caretPos, caretPos);\n }\n });\n }\n\n toggleAttachPanel(e) {\n e.preventDefault();\n this.setState(s => ({attachOpen: !s.attachOpen, emojiOpen: false}));\n }\n\n // 3.12/4.9-4.14 发名片:选一个好友,生成一张只含姓名+头像+该好友 uid 的名片消息发到当前会话。\n // uid 必须用 TheCard.setTinodeID 写进 comm 数组(vCard 的\"tinode\"协议项),不是随便塞进某个\n // 字段——widgets/the-card-mini.jsx 点开这张卡片时用 TheCard.getFirstTinodeID(card) 读这个\n // 协议项来判断\"发消息\"按钮该指向谁,写错地方那个按钮会永远不出现。\n openCardPicker(e) {\n e.preventDefault();\n this.setState({attachOpen: false, cardPicker: {loading: true}});\n getFriends().then(data => {\n this.setState({cardPicker: {loading: false, items: data.items || []}});\n }).catch(() => this.setState({cardPicker: {loading: false, items: [], error: true}}));\n }\n\n sendCard(item) {\n this.setState({cardPicker: null});\n const build = avatarUrl => {\n const card = new TheCard(item.display_name || item.user_id, avatarUrl);\n TheCard.setTinodeID(card, item.user_id);\n // Every other attachment sender (image/video/file/voice) threads a typeHint through to\n // messages-view.jsx's sendMessage(msg, uploadCompletionPromise, uploader, typeHint) so the\n // backend's imMessageType() classifier -- which only ever looks at head['x-im-type'] or a flat\n // content.file_id/url, never at real Drafty entities -- doesn't fall through to its \"text\"\n // default. This call was only ever passing the first argument, so every card message has been\n // silently misclassified as plain text (confirmed live: search/history summarize it as raw\n // Drafty JSON instead of a name).\n this.props.onSendMessage(Drafty.appendTheCard(null, card), undefined, undefined, 'card');\n };\n if (item.avatar_file_id) {\n getFileUrl(item.avatar_file_id).then(build).catch(() => build(undefined));\n } else {\n build(undefined);\n }\n }\n\n // 收藏发送:走的是 Ch.7 已有的 forwardFavorites REST 接口(转发收藏的同一个接口,目标只给\n // 当前会话一个),不经过 onSendMessage/Drafty——收藏本来就是后端已经存好快照的独立资源,\n // 不是本地新拼一条消息。\n openFavPicker(e) {\n e.preventDefault();\n this.setState({attachOpen: false, favPicker: {loading: true}});\n getFavorites({type: 'all'}).then(data => {\n this.setState({favPicker: {loading: false, items: data.items || []}});\n }).catch(() => this.setState({favPicker: {loading: false, items: [], error: true}}));\n }\n\n sendFavorite(item) {\n this.setState({favPicker: null});\n if (!this.props.topicName) {\n return;\n }\n // 这个接口恒定 200,真实成败要看 items[].status(跟批量收藏/批量转发是同一套设计,全局代码\n // 审查那一轮已经在其它几处调用点踩过同一个坑并修过——这是新写的这处,同样的坑要一起避开,\n // 不能只 .catch 网络层错误就当万事大吉。联调时真的用这条路径测出过 200 OK 但\n // items[0].status:\"failed\"、reason:\"PERMISSION_DENIED\" 的情况(对方是真实好友、这个会话\n // 本身正常能发消息),看起来是后端这个接口自己的权限判断有问题,不是本地能修的,如实报错\n // 而不是假装发送成功。\n forwardFavorites([item.favorite_id], [this.props.topicName]).then(result => {\n const failed = (result && result.items || []).filter(r => r.status === 'failed');\n if (failed.length && this.props.onError) {\n this.props.onError('发送失败:' + (translateReason(failed[0].reason) || failed[0].reason || '未知原因'), 'err');\n }\n }).catch(err => {\n if (this.props.onError) {\n this.props.onError((err && err.message) || '发送失败', 'err');\n }\n });\n }\n\n // 4.7-4.9 按住说话 + 上滑取消:mousedown/touchstart 直接挂载 AudioRecorder(挂载即开始录音,\n // 这一步跟原来点一下进入录音模式完全一样,没有改 AudioRecorder 自己的录音逻辑),松手时通过\n // ref 直接调它的 handleDone/handleDelete——这两个方法本来是绑给它自己按钮的 onClick,要求一个\n // 带 preventDefault 的事件对象,这里传一个最小的假事件满足这个要求,除此之外没有更深地伸手进\n // 它的内部状态。上滑距离阈值 80px 是参照大多数同类应用(微信等)的常见取值,没有对应的可验证\n // 数值来源,明确记录不是抄的哪个具体规格。\n startHoldRecording(e) {\n e.preventDefault();\n if (this.state.audioRec) {\n return;\n }\n this.holdStartY = 'touches' in e ? (e.touches[0] && e.touches[0].clientY) : e.clientY;\n this.setState({audioRec: true, audioCancelling: false, emojiOpen: false, attachOpen: false});\n window.addEventListener('mousemove', this.handleHoldMove);\n window.addEventListener('mouseup', this.endHoldRecording);\n window.addEventListener('touchmove', this.handleHoldMove, {passive: false});\n window.addEventListener('touchend', this.endHoldRecording);\n // mouseup/touchend only fire for a release point still inside this window/tab -- dragging the\n // pointer out of the browser entirely, switching tabs/apps, or a permission prompt stealing\n // focus (e.g. the very getUserMedia prompt this recording itself triggered, on a second call)\n // all leave the mic running with no further event this listener pair will ever see. Ending the\n // recording (same finish-or-cancel logic as a normal release, per the cancel-zone check) on\n // either signal is a safer default than waiting indefinitely for a mouseup that may never come.\n window.addEventListener('blur', this.endHoldRecording);\n document.addEventListener('visibilitychange', this.handleHoldVisibilityChange);\n }\n\n handleHoldVisibilityChange() {\n if (document.hidden) {\n this.endHoldRecording();\n }\n }\n\n handleHoldMove(e) {\n const y = 'touches' in e ? (e.touches[0] && e.touches[0].clientY) : e.clientY;\n if (y == null || this.holdStartY == null) {\n return;\n }\n const cancelling = (this.holdStartY - y) > 80;\n if (cancelling !== this.state.audioCancelling) {\n this.setState({audioCancelling: cancelling});\n }\n }\n\n endHoldRecording() {\n window.removeEventListener('mousemove', this.handleHoldMove);\n window.removeEventListener('mouseup', this.endHoldRecording);\n window.removeEventListener('touchmove', this.handleHoldMove);\n window.removeEventListener('touchend', this.endHoldRecording);\n window.removeEventListener('blur', this.endHoldRecording);\n document.removeEventListener('visibilitychange', this.handleHoldVisibilityChange);\n this.holdStartY = null;\n const fakeEvent = {preventDefault: () => {}};\n if (this.audioRecorderInstance) {\n if (this.state.audioCancelling) {\n this.audioRecorderInstance.handleDelete(fakeEvent);\n } else {\n this.audioRecorderInstance.handleDone(fakeEvent);\n }\n }\n }\n\n render() {\n const { formatMessage } = this.props.intl;\n const prompt = this.props.disabled ?\n formatMessage(messages.messaging_disabled) :\n (this.props.messagePrompt ?\n formatMessage(messages[this.props.messagePrompt]) :\n formatMessage(messages.type_new_message));\n\n const sendIcon = (this.props.reply && this.props.reply.editing) ?\n 'check_circle' : 'send';\n\n const quote = this.state.quote ?\n () : null;\n const audioEnabled = this.state.audioAvailable && this.props.onAttachAudio;\n const mentionPanel = this.state.mentionQuery != null ?\n (
    \n {this.state.mentionResults.length === 0 ?\n
    无匹配成员
    :\n this.state.mentionResults.map((item, i) => (\n
    { e.preventDefault(); this.selectMention(item); }}\n onMouseEnter={() => this.setState({mentionHighlight: i})}>\n {item.group_nickname || item.display_name || item.user_id}\n
    \n ))}\n
    ) : null;\n return (\n
    \n {!this.props.noInput ? quote : null}\n {mentionPanel}\n
    \n {!this.props.disabled ?\n <>\n {this.props.noInput ?\n (quote ||
    ) :\n (this.state.audioRec ?\n (
    }>\n {this.audioRecorderInstance = ref;}}\n holdMode={true}\n cancelling={this.state.audioCancelling}\n onRecordingProgress={_ => this.props.onKeyPress(true)}\n onDeleted={_ => this.setState({audioRec: false})}\n onFinished={this.handleAttachAudio}/>\n ) :\n