根因:tinode-sdk自己的合并工具mergeObj(utils.js)对Date类型字段有"保留更新 的值"的防护,但普通数字字段(seq/read/recv/unread)完全没有防护,谁的数据 后到就直接覆盖——读源码逐行确认。startMeReconciliation()新增的定时/切换焦点 触发的withLaterSub()增量拉取一旦命中"服务端返回的read游标还没跟上客户端刚 发出的已读回执"这种时序,就会把已经读过的会话悄悄改回未读:角标无缘无故重新 出现,且重新聚焦窗口也不会清除,因为对这个会话来说根本没有发生任何新事情去 重新触发标记已读。 修复:reconcileMeSubs()改成在发起这次增量拉取前,先给所有已知会话的 seq/read/recv/unread拍个快照;拉取完成后,对每个"拉取前就已经认识"的会话, 如果发现seq没变但unread反而变多了,直接把read/recv/unread改回快照里的值并 触发通知——只有真正全新的会话(拉取前不认识)才信任这次拉取回来的数据,这 本来就是这个兜底机制存在的唯一目的。 实机验证:monkey-patch me.getMeta,让它在真实网络请求返回后额外注入一条 过期的sub记录(模拟服务端读游标滞后),再用真实的focus事件触发 reconcileMeSubs()整条链路——确认最终状态仍然正确显示已读,而不是被污染。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
- Read client-side and server-side API documentation.
- For support, general questions, discussions post to https://groups.google.com/d/forum/tinode.
- For bugs and feature requests open an issue.
- Use https://tinode.co/contact for commercial inquiries.
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
- Demo avatars and some other graphics are from https://www.pexels.com/ under CC0 license.
- Background patterns from http://subtlepatterns.com/, commercial and non-commercial use allowed with attribution.
- Fonts and icons from Google under license which permits commercial and non-commercial use.
- Push notifications built with https://firebase.google.com/.






