Commit Graph
316 Commits
Author SHA1 Message Date
Austin 134ac8580e fix(security): 修复宵禁策略未生效于群聊话题的问题
添加注释说明宵禁仅作用于私聊和群聊,同时将话题类型判断从仅私聊扩展至群聊,确保两类消息话题均会应用宵禁策略。
2026-09-23 14:14:44 +08:00
richjohnrambo 40aba2a3f5 fix tenant-scoped user search 2026-09-23 13:45:39 +08:00
Austin 6bbe955e75 feat: 新增共库模式下登录失败日志表及相关功能
- 新增登录失败日志表(共库多租户版),添加 tenant_id 列实现租户隔离
- 调整登录失败日志逻辑,仅记录触发账号锁定的事件
- 新增管理端接口功能,为登录失败日志补充实时锁定状态
- 更新测试用例适配共库模式下的租户过滤逻辑
2026-09-23 13:18:28 +08:00
Austin b8b21d3548 feat(server): 为内部管理查询添加租户隔离支持
实现共库模式下的租户数据隔离,新增 TenantColumn 字段标识查询表的租户列,添加 internalAdminTenantCondition 函数生成租户过滤条件。修改所有内部管理查询的构建逻辑,在列表和详情查询中自动注入租户条件,防止跨租户数据泄漏。同时更新所有资源查询规格,配置对应表的租户列。
2026-09-23 12:11:26 +08:00
richjohnrambo a0d0bf574e unbind device push token on logout 2026-09-23 11:39:16 +08:00
richjohnrambo c4355ac236 fix: accept raw phone secret for personal registration 2026-09-23 11:33:16 +08:00
richjohnrambo ac20f1ed25 fix message mutation responses 2026-09-23 10:47:31 +08:00
richjohnrambo b413560455 fix tenant group topic and member cache 2026-09-23 10:35:06 +08:00
richjohnrambo 6303d07580 fix: avoid stale profile projections in shared schema 2026-09-23 10:28:15 +08:00
richjohnrambo 7f0903cd31 fix tenant scoping for group business tables 2026-09-23 10:10:08 +08:00
richjohnrambo 35a70ce9ff fix group tenant topic creation 2026-09-23 09:59:53 +08:00
richjohnrambo 6fa3009987 fix tenant sharding for group topics 2026-09-23 09:49:14 +08:00
richjohnrambo a968fd252e fix: use shared tables for tenant group members 2026-09-23 09:41:45 +08:00
richjohnrambo 7c1fab5065 租户库共库分表实现 2026-09-23 09:36:17 +08:00
richjohnrambo 137d6fb6da fix verification cache for redis-backed challenges 2026-09-23 09:02:56 +08:00
richjohnrambo e37b52c3c0 feat: complete shared database tenant sharding 2026-09-23 02:19:07 +08:00
richjohnrambo 1ec2feee47 fix: keep only tenant realname review policy 2026-09-23 02:08:13 +08:00
richjohnrambo 62856194e5 fix HTTP idempotency insert placeholders 2026-09-23 00:28:26 +08:00
richjohnrambo 1909074898 fix tenant friend request row scans 2026-09-22 20:26:43 +08:00
richjohnrambo 9ddf6ec5ee fix shared-db tenant runtime gaps 2026-09-22 19:28:33 +08:00
Austin 49e43aa3cf fix(mysql): read realname policy fallback from im_tenant
Tenant config was merged into im_tenant on the manager side; switch the
DB fallback query accordingly. Keep ErrNoRows/unknown-column fallbacks
so environments before the phase-1 migration degrade to defaults.
2026-09-22 19:08:42 +08:00
richjohnrambo 8e04f00e96 fix shared database account sequence initialization 2026-09-22 18:00:18 +08:00
richjohnrambo e4416da04a fix im server shared database config 2026-09-22 16:45:24 +08:00
richjohnrambo b8c93e8d6a fix(mysql): route tenant data to physical shard tables 2026-09-22 16:11:10 +08:00
richjohnrambo 76b462e334 docs(sql): add shared database sharding migrations 2026-09-22 15:19:56 +08:00
richjohnrambo 2e0612acbb fix(mysql): adapt tenant shared database fields 2026-09-22 14:40:15 +08:00
richjohnrambo 865b436264 fix: skip challenge requirement for fixed test code 2026-09-22 00:46:35 +08:00
richjohnrambo ac10b31aa1 fix: accept fixed legacy registration code 2026-09-22 00:39:14 +08:00
richjohnrambo 3276c6d1cd fix: allow legacy enterprise registration payloads 2026-09-22 00:23:53 +08:00
richjohnrambo dc36ce292e refactor: unify internal api authentication 2026-09-21 23:08:15 +08:00
richjohnrambo 186cfa21c8 feat: validate personal and enterprise auth tenants 2026-09-21 21:24:25 +08:00
richjohnrambo fc393cd685 docs: add aliyun realname integration notes 2026-09-21 21:24:25 +08:00
Your NameandClaude Sonnet 5 b30cce950a fix(docker): mirror tinode's own log output to stdout
Confirmed live: /var/log/tinode.log-only redirection meant Loki never
received a single real tinode runtime log line (election, rehash,
connection, error output) since the container started -- Promtail
collects standard container stdout/stderr, not files written inside
the container. Every Pod's collected log was just this script's own
"NO_DB_INIT=true: skipping..." init line, nothing from tinode itself.

Now more consequential with native Cluster enabled: failover/rehash
state transitions were completely invisible to the normal Grafana/Loki
monitoring path, visible only via manual kubectl exec.

tee mirrors to both stdout (collected) and the file (still readable via
kubectl exec). PIPESTATUS[0] is required since a bare $? after a pipe
would report tee's exit status, not tinode's -- which also let this
drop the now-redundant "tail last 200 lines to stderr on crash" block,
since the full live stream already went to stdout throughout the run.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 20:23:25 +08:00
Your NameandClaude Sonnet 5 4abd6604d7 fix(deploy): raise rollout timeout for StatefulSet's sequential update
StatefulSet's RollingUpdate replaces Pods one at a time in strict
sequence (unlike a Deployment, and unaffected by podManagementPolicy:
Parallel, which only governs initial scale-up/down) -- confirmed live:
run #152 restarted correctly (2/3 pods updated, then the 3rd) but hit
the old 120s ceiling before the last pod turned Ready, so CI reported
"failure" for a rollout that actually completed successfully seconds
later. 300s gives enough headroom for three sequential pod cycles
(image pull + start + native-Cluster rejoin) instead of tuning it to
the exact observed timing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 19:49:44 +08:00
Your NameandClaude Sonnet 5 eca2ee56c0 fix(deploy): update rollout commands for StatefulSet migration
im-server moved from Deployment to StatefulSet in im-deploy-config
(native Cluster enablement) -- this workflow's kubectl commands still
targeted the old resource type, so every deploy since the migration
failed at the final step with "deployments.apps im-server not found"
(image built/pushed fine, just never got rolled out).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 19:40:26 +08:00
Austin 9820e89e1c refactor(server/auth): 移除账号掩码函数并简化审计日志存储
1.  移除不再使用的maskLoginAccount工具函数
2.  登录审计日志直接存储原始账号而非掩码后的版本
3.  重命名测试函数以匹配新的业务逻辑
2026-09-21 17:50:55 +08:00
richjohnrambo 55c59878cf fix: resync user account sequence 2026-09-21 16:55:24 +08:00
Austin a147dc718a refactor(server): 优化登录锁定提示文案和时长计算逻辑
更新了loginLockedMessage函数,细化了锁定时长的提示分级,增加了过期回退文案,让提示更准确友好
2026-09-21 13:55:02 +08:00
richjohnrambo 407842db91 fix: prepare native cluster deployment 2026-09-21 13:52:34 +08:00
richjohnrambo 5f717c2162 refactor: read user profile fields from profile table 2026-09-21 13:44:04 +08:00
Austin d398467fb9 docs: add IM contact us interface docking documentation
Complete the 4251-line docking document for IM contact us interface, including function description, interface definition, client rendering rules, local debugging example, operation configuration steps and reference implementation
2026-09-21 13:28:12 +08:00
Austin 9748c7a478 Merge branch 'dev' of https://git.118im.com/im_team/im_server into dev 2026-09-21 13:14:30 +08:00
Austin 7829990180 feat: 添加联系我们配置接口和字典配置缓存
1. 新增DictionaryItem字典配置结构体
2. 添加字典配置缓存及失效逻辑
3. 实现联系我们接口的业务逻辑和测试用例
4. 注册联系我们API路由
5. 集成字典配置到admin内部客户端
6. 处理字典配置更新的kafka事件
2026-09-21 13:11:42 +08:00
richjohnrambo 05ad37ba80 fix: persist settings for websocket groups 2026-09-21 11:58:36 +08:00
richjohnrambo c891afba73 test: 更新登录锁定表初始化断言 2026-09-21 09:55:29 +08:00
richjohnrambo e3b93113f1 feat: 接入消息加密与实名认证能力 2026-09-21 09:53:39 +08:00
Austin 841c0c77cd feat: 实现登录失败锁定功能
新增了登录失败次数统计和临时锁定机制,包括:
1. 定义登录锁定数据结构和数据库表结构
2. 实现租户级别的锁定状态持久化接口
3. 添加登录速率限制安全策略配置
4. 在登录流程中加入锁定前置检查和失败计数逻辑
5. 提供管理员手动解锁的内部API接口
6. 新增中文本地化的锁定提示文案
2026-09-20 17:08:38 +08:00
Austin 21063d4af0 Merge branch 'dev' of https://git.118im.com/im_team/im_server into dev 2026-09-20 16:39:46 +08:00
Austin 532ff49737 fix(im): parse Drafty entities for message type classification (#31)
Favorites from Drafty messages (link/file/image/video/voice) always fell back to text because imMessageType only recognized flat file_id/url content. Derive the type from Drafty ent[] entities: LN->link, IM->image, VD->video, AU->voice, EX refined by mime. Attachments win over inline links.
2026-09-20 16:38:51 +08:00
richjohnrambo 5c276596b8 fix: support removing group members 2026-09-20 15:37:56 +08:00