Your Name 50767f701f 修复已建立的P2P会话详情栏/头像404:话题名不是对方user_id
用户报告:控制台反复出现 GET /v1/im/users/p2pp77kUAkgqpVbZoiTpjPWtg/profile
404。根因:这个应用的多处代码(DetailColumn的好友资料/拉黑/备注/删除好友,以及
本会话早前刚加的头像peerProfileQuery)一直假设"P2P会话的topicId就是对方的
user_id"——这个假设只在"第一次用对方usr...地址打开、还从未真正subscribe过"
这个短暂窗口内成立。读tinode-sdk源码确认:一旦subscribe成功,SDK会把这个话题
从usr...地址重命名为服务端分配的真实p2p...哈希名,而Topic.topicType()自己的
前缀表里根本没有p2p这一项(只有usr映射到P2P类型),导致topic.isP2PType()/
topic.p2pPeerDesc()对已建立的会话恒定返回false/undefined——SDK自己内建的"取
对方身份"方法在这个场景下也是坏的,不只是这个项目自己的代码有问题。

只要一个P2P会话有过真实的消息历史(几乎所有现存对话都是这样),它的topicId
就是这个不能反解的p2p...哈希,而不是对方user_id,直接拿去查/v1/im/users/{id}/
profile、匹配好友列表的user_id、传给拉黑/删除好友接口,全部会用错id。

修复:topics.ts新增getP2PPeerUserId(topic, myUserId)——topicId本身是usr...
前缀时直接返回(还没subscribe过,本来就对),否则读topic.subscribers()真实
的订阅者列表,找出不是自己的那个人的真实user_id;订阅者列表还没加载出来时返回
undefined而不是猜一个不可能对的值,调用方原本就有的enabled门控会正确地等待
而不是提前拿错误id发请求。tinode-sdk.d.ts补充subscribers()方法和Subscription
类型声明(原来完全没声明这个方法)。DetailColumn.tsx/ConversationView.tsx改用
这个真实user_id去查资料/匹配好友/头像取色,不再直接假设topicId能用。

实机验证:真实会话grpMc5uN...不对,是p2pp77kUAkgqpVbZoiTpjPWtg(systest04↔
systest02,有真实历史消息的老会话)——修复前详情栏"ID:"整行空白、404貫穿控制
台;修复后详情栏正确显示"ID:usrp77kUAkgqpU",好友资料/备注/拉黑状态全部正确
关联到真实好友记录。
2026-09-17 12:52:44 +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