Commit Graph
59 Commits
Author SHA1 Message Date
richjohnrambo 7b942da975 feat: add aliyun oss media handler 2026-08-23 23:20:33 +08:00
richjohnrambo a578acebf7 fix: handle nullable recalled_by in mysql messages 2026-08-23 23:08:56 +08:00
richjohnrambo 641697e755 docs: update IM integration contract examples 2026-08-23 23:05:45 +08:00
richjohnrambo d14942b1a1 fix: preserve group member user ids 2026-08-23 22:29:22 +08:00
richjohnrambo c89c466387 feat: implement first batch im enhancements 2026-08-21 11:42:45 +08:00
richjohnrambo 14abe58b88 test: add websocket protocol audit 2026-08-21 00:42:54 +08:00
richjohnrambo ff616b9c5d fix: align favorite batch endpoint 2026-08-20 23:29:10 +08:00
richjohnrambo 2b3480fa5f fix: stabilize test environment IM endpoints 2026-08-20 23:06:54 +08:00
richjohnrambo 6c6d2f6d3b fix: stabilize im audit endpoints 2026-08-20 22:34:36 +08:00
richjohnrambo 3e1ce5df26 feat: allow viewing user profile QR codes 2026-08-20 17:54:12 +08:00
richjohnrambo 6db2938672 feat: add bootstrap entry badges 2026-08-20 15:59:16 +08:00
richjohnrambo d467323ecb docs: clarify test registration code 2026-08-20 14:10:05 +08:00
richjohnrambo c09ea2ac53 fix: stabilize container validator startup 2026-08-20 13:28:28 +08:00
richjohnrambo 43e8af68d6 fix: adjust phone registration username flow 2026-08-20 12:08:55 +08:00
richjohnrambo 73ddb2d9fa fix: improve IM user account search 2026-08-19 17:23:36 +08:00
richjohnrambo b3d18f9d8d Merge remote-tracking branch 'origin/dev' into dev 2026-08-19 17:02:34 +08:00
richjohnrambo 405dad2eef fix: use fixed code for registration verification 2026-08-19 16:52:20 +08:00
richjohnrambo 4e75cfc65e fix: restore verification target user ids 2026-08-19 01:17:09 +08:00
richjohnrambo 219ecadf4c feat: complete registration invitation and auth redesign 2026-08-19 00:30:11 +08:00
richjohnrambo e063e7879e fix: canonicalize phone numbers as E.164 2026-08-18 01:23:18 +08:00
richjohnrambo bf562c7d56 feat: migrate IM identity and snowflake primary keys 2026-08-18 01:15:21 +08:00
richjohnrambo db322d80dd docs: sync IM integration guide with current behavior 2026-08-17 15:28:00 +08:00
richjohnrambo b116adc6a1 docs: clarify IM registration account payload 2026-08-17 15:23:13 +08:00
richjohnrambo c60ed2e9ed fix: page friend list by peer id 2026-08-17 15:20:02 +08:00
richjohnrambo d10c05b030 fix: decode bearer tokens for IM HTTP 2026-08-17 15:08:32 +08:00
richjohnrambo b7a5d5cb17 fix: align message revision schema with tenant databases 2026-08-17 14:54:50 +08:00
richjohnrambo e14dec9af7 fix: keep routed tenants on scoped mysql adapter 2026-08-17 14:49:23 +08:00
richjohnrambo 47968e39fa fix: use tenant database auth schema 2026-08-17 14:43:17 +08:00
richjohnrambo 4ec84f961b fix: allow phone number as basic login 2026-08-17 14:28:24 +08:00
richjohnrambo cf590a1c78 chore: point tinode db config to remote mysql 2026-08-17 13:58:09 +08:00
richjohnrambo f2c229135b feat: complete IM P0 and P1 reliability work 2026-08-17 13:43:27 +08:00
richjohnrambo ddf0f7a55e feat: persist group business state in tables 2026-08-17 09:50:31 +08:00
richjohnrambo d8d1639d5b fix mysql tenant database schema cleanup 2026-08-15 15:48:17 +08:00
richjohnrambo 672fc68cfa Merge remote-tracking branch 'origin/dev' into dev 2026-08-15 15:07:04 +08:00
richjohnrambo 7888c87634 im 服务端 2026-08-15 15:06:06 +08:00
Your Name a7c5bc9bbd 修复登录500: auth/credentials表缺少tenant_id列
登录时报 Error 1054: Unknown column 'tenant_id' in 'where clause'。

根因:CreateDb里auth/credentials的建表语句从未定义过tenant_id列——这不是
版本跳过导致的迁移遗漏,而是即便全新安装也会触发的建表语句本身的缺陷,
因为查询代码(AuthAddRecord/AuthGetUniqueRecord等)一直在无条件地按
tenant_id过滤/写入这两张表。

同时migration脚本里的dropTenantIDColumns此前会把auth/credentials的
tenant_id也当成"新增多租户特性表的遗留列"一并删掉,跟前面加的列直接打架。

修复:
- adapter.go: CreateDb的auth/credentials建表语句补上tenant_id列,
  修正未来全新安装的根源问题
- apply_hotgo_tenant_db.go: 补上ALTER TABLE ADD COLUMN(现有数据回填到
  默认租户id=1);dropTenantIDColumns排除auth/credentials,不再误删
2026-08-15 14:35:02 +08:00
Your Name 76ca6147ec 修复{hi}握手拒绝未携带tenant字段的客户端
多租户改造给{hi}握手消息加了必填的tenant字段,但目前的im_webapp(以及
现有iOS/Android客户端)都是标准Tinode SDK,不知道要发这个新字段,导致
每次连接握手都被判定为malformed(400),前端表现为反复断线重连。

改为tenant为空时回退到默认租户"default"(对应迁移脚本里seed的那条记录),
不再直接拒绝;显式携带tenant code的客户端行为不受影响,仅长度校验保留。
2026-08-15 14:25:59 +08:00
Your Name b01ed29751 修复迁移脚本: 补全CreateDb版本跳过导致缺失的表
CreateDb的多个建表函数(createTenantRegistry/createIMSecurityTables/
createIMNotificationTables/createIMRelationTables)只在全新库的建表路径里
调用;UpgradeDb对已存在且版本号已达标的库直接判定"无需升级"直接跳过,
不会补建任何表。我们这个tinode库版本号刚好已经等于目标版本,所以这几个
函数从未真正执行过。

补上迁移脚本里缺失的表(与adapter.go里的建表语句保持一致):
tinode.im_tenant / im_tenant_config (原脚本假设已存在,直接ALTER导致报错)
tinode.im_realname_verifications / im_action_tokens
tinode.im_system_notifications
tinode.im_friend_requests / im_friendships / im_user_blocks / im_favorites
2026-08-15 14:17:53 +08:00
Your Name 57274778b5 接入Gitea Actions蓝绿部署:本地源码构建替代release下载,接入租户注册表迁移
- 新增docker/tinode/Dockerfile.build:从本仓库源码编译server/tinode-db/
  apply_hotgo_tenant_db,替代原Dockerfile下载GitHub release的方式(否则
  workbench/组织架构/会议等改造代码永远不会真正跑起来)
- config.template补上连接池设置(max_open_conns等,此前im_server踩过注册卡死
  的坑),并启用tenant_db_routing+tenant_registry_db=hotgo,对应本仓库自带
  tinode.conf里的默认约定,单租户场景下会透明落回同一个tinode库
- entrypoint.sh在init-db之后追加执行apply-hotgo-tenant-db,幂等地建好/
  升级hotgo租户注册表及tinode库里的workbench/组织架构/会议/日报/信箱等新表
- 新增.gitea/workflows/deploy.yml,复用服务器上已有的蓝绿部署脚本
2026-08-15 14:08:07 +08:00
richjohnrambo 5af396c5f5 im 服务端 2026-08-15 01:33:23 +08:00
richjohnrambo 7c360167b3 单元测试 2026-08-14 23:46:28 +08:00
richjohnrambo 04c7a148e1 单元测试 2026-08-14 23:37:31 +08:00
richjohnrambo 170bbdca76 feat: add safety reporting APIs 2026-08-14 00:01:54 +08:00
richjohnrambo fa75c0f0f9 feat: add workbench and client settings APIs 2026-08-13 23:43:24 +08:00
richjohnrambo dfcccbb761 feat: add chapter eight call records 2026-08-13 16:14:57 +08:00
richjohnrambo 92d0066a02 feat: support tenant database routing 2026-08-13 15:07:06 +08:00
richjohnrambo 31f82d9c41 feat: add im tenant db routing and chapter seven flows 2026-08-13 11:30:48 +08:00
richjohnrambo 774a448c12 feat: add im group mention flows 2026-08-12 15:33:56 +08:00
richjohnrambo 943ebe1397 feat: complete im p2p relationship onboarding 2026-08-12 15:20:15 +08:00
richjohnrambo d02041659e feat: add im relationship flows 2026-08-12 11:31:16 +08:00