Your NameandClaude Sonnet 5 a964d51ba5 修复回复/编辑消息触发风控弹窗时,"正在回复"预览条在弹窗结果出来前就被清空
现象:对一条历史消息点"回复",输入含链接的文本点发送,风控弹窗(安全提醒/警示级)
刚弹出的同时,composer 里"正在回复 XX"的预览条就已经消失了;如果这时候点"取消发送",
这条回复就被永久放弃——原来引用的消息内容和回复关系不再存在,也没有任何提示,唯一的
恢复办法是回到那条历史消息重新点一次"回复"。编辑消息(修改一条已发消息的内容后再次
包含链接)是同一根因的同款问题,只是编辑可以靠重新点"编辑"找回原文,没有回复那么彻底
不可逆。

根因:sendMessage() 原来在根据 this.state.reply / this.props.forwardMessage 组装好
msg/head 之后,同步、无条件地立刻调用了 this.handleCancelReply()(清空 reply/编辑
状态),这一步发生在下面的 URL 风控检查(POST /security/urls/check)之前——但风控
弹窗要等用户点"继续发送"或"取消发送"才会真正决定要不要走 doSend(),这中间的等待期里
UI 状态已经被提前清空了。

修法:把 handleCancelReply() 从三处提前调用点移到 doSend() 内部、真正调用
this.props.sendMessage(...) 之前。这样它只在真的要发送时才执行——不含链接的普通消息
里 doSend() 本来就是同步立即执行,时机与原来完全一样;命中风控的消息里,"继续发送"
时才会触发(此时清空回复状态是正确的,消息确实发出去了),"取消发送"时 doSend()
根本不会被调用,回复/编辑的预览条和引用内容都会完整保留,可以直接修改文本重试或
自己手动取消。转发场景不受影响:转发消息不会触发这条风控检查(originalText 恒为
null),移动调用时机对它是纯粹的时序等价替换。

验证:真实浏览器操作,对一条消息点"回复",输入含 https://example.com/a?token=abc123
的文本发送——警示弹窗弹出的同时预览条仍然可见;点"取消发送"后弹窗消失、预览条依旧
完整保留、composer 文本不变;再次点发送、这次点"我已知晓,继续发送",消息正确以
带引用卡片的回复形式发出,预览条在发送成功后才清空。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 13:32:59 +08:00
2022-06-19 12:53:09 -07:00
2026-01-20 12:58:58 +03:00
2026-07-04 15:19:03 +03:00
2018-04-21 21:46:21 -07:00
2018-08-13 11:36:50 +03:00
2021-11-10 14:11:53 -08:00
2026-07-04 15:19:03 +03:00
2020-02-14 09:58:03 +03:00
2025-10-27 19:32:33 +03:00
2025-10-27 19:32:33 +03:00

Tinode Web

Briefing

Single-page web chat application for Tinode. The app is built on React. The Tinode javascript SDK has no external dependencies. Overall, it's a lot like open source WhatsApp or Telegram web apps.

Although the app is generally usable, keep in mind that this is work in progress. Some bugs probably exist, some features are missing. The app was tested in the latest Chrome & Firefox only. NPM package is available.

Try possibly newer or older version live at https://sandbox.tinode.co/.

For demo access and other instructions see here.

Installing and running

This is NOT a standalone app, this is just a frontend, a client. It requires a backend. See installation instructions. See instructions for enabling push notifications.

Getting support

Helping out

  • If you appreciate our work, please help spread the word! Sharing on Reddit, HN, and other communities helps more than you think.
  • Consider buying paid support: https://tinode.co/support.html
  • If you are a software developer, send us your pull requests with bug fixes and new features.
  • If you use the app and discover bugs or missing features, let us know by filing bug reports and feature requests. Vote for existing feature requests you find most valuable.
  • If you speak a language other than English, translate the apps into your language. You may also review and improve existing translations.
  • If you are a UI/UX expert, help us polish the app UI.
  • Use it: install it for your colleagues or friends at work or at home.

Internationalization

The app is fully internationalized using React-Intl. The UI language is selected automatically from the language specified by the browser. A specific language can be forced by adding #?hl=XX parameter to the URL when starting the app, e.g. https://web.tinode.co/#?hl=fr.

The app is currently available in the following languages:

  • English - default
  • Arabic
  • Chinese simplified
  • Chinese traditional
  • French
  • German
  • Italian
  • Korean
  • Romanian
  • Russian
  • Spanish
  • Thai
  • Ukrainian
  • Vietnamese

More translations are welcome. See instructions.

Not done yet

  • End-to-End encryption.
  • Emoji support is weak.
  • Mentions, hashtags.
  • Previews not generated for links and docs.
  • Location and contact sharing.
  • Recording video messages.

Other

Responsive design

Desktop screenshot

Desktop web: full app

Mobile screenshots

Mobile web: contacts Mobile web: chat Mobile web: chat dark mode Mobile web: topic info Mobile web: forward message Mobile web: video call

S
Description
No description provided
Readme
111 MiB