上一条commit修的是"消息本身发不出去",这条修的是同一个根因链条上更早 一环:SDK只对`me`话题的onMetaSub/onSubsUpdated两个回调做了这个"联系 人变化了"的通知(读tinode.dev.js确认:无论是哪个话题触发的订阅,SDK 永远只调用me.onMetaSub/me.onSubsUpdated,不是触发订阅的那个话题自己 的回调),但这个项目的wireTopicCallbacks只接了onSubsUpdated,漏了 onMetaSub——这正是brand-new P2P话题从usr别名被服务端改名成真实 p2p...哈希的那一刻,SDK唯一会触发的两个回调之一。 现在两个回调都接上、都指向同一个notify(),会话列表和ConversationView 自己的contact查找(决定头部显示真实昵称还是裸id、在线还是离线)应该 能在好友关系刚建立、还没有任何一方发过消息时就正确更新,不用等一次不 相关的全量重连才被动捡回正确状态。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the Oxlint configuration
If you are developing a production application, we recommend enabling type-aware lint rules by installing oxlint-tsgolint and editing .oxlintrc.json:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "typescript", "oxc"],
"options": {
"typeAware": true
},
"rules": {
"react/rules-of-hooks": "error",
"react/only-export-components": ["warn", { "allowConstantExport": true }]
}
}
See the Oxlint rules documentation for the full list of rules and categories.