Commit Graph
242 Commits
Author SHA1 Message Date
Austin 48b3369799 Merge branch 'dev' of https://git.118im.com/im_team/im_server into dev 2026-09-20 14:52:08 +08:00
Austin b2e8b64c0b refactor(mysql): 适配PXC严格模式,替换全局锁方案
重构MySQL迁移逻辑,新增acquireMigrationLock适配Percona XtraDB Cluster的pxc_strict_mode限制,将原有的GET_LOCK迁移锁替换为更兼容的方案,同时为各迁移流程添加快速检查路径减少锁竞争
2026-09-20 14:52:01 +08:00
richjohnrambo db66a965fa feat: 支持养成后台调用IM内部接口 2026-09-19 17:07:39 +08:00
richjohnrambo de01a95c96 Merge remote-tracking branch 'origin/dev' into dev 2026-09-19 15:25:40 +08:00
richjohnrambo a08c0bd921 feat: 提供养成服务内部 IM 能力 2026-09-19 15:24:55 +08:00
richjohnrambo 0fcbbb9318 fix: publish member joined after group invitation 2026-09-18 20:58:00 +08:00
Austin 753a04ed12 fix: broadcast offline presence as soon as the last session drops
Logout left contacts seeing the user online until the me topic idle timeout
fired presUsersOfInterest(off), and even that frame was silently dropped
for p2p routes by handlePresence's xoriginal check. MarkUserOffline now
returns the remaining session count and cleanUp notifies users of interest
immediately once it hits zero; p2p presence is delivered straight to the
contact's me topic, mirroring presSingleUserOffline. Zentao #22.
2026-09-18 17:42:18 +08:00
Austin f4cedc7d75 fix: push realtime del presence to topic sessions on message recall
The REST recall response reached only the caller, so peers kept showing the
recalled message until a full resync. broadcastIMMessageRecalled now pushes
the native {pres what:del delseq} tombstone through the hub for both single
and batch recall (empty pres topic for p2p, required by handlePresence's
xoriginal check); clients flush the message and render the recalled
placeholder. Zentao #16, #2.
2026-09-18 17:42:09 +08:00
richjohnrambo 8b20118570 feat: enforce youth mode policy and improve search 2026-09-18 14:51:40 +08:00
richjohnrambo 9482bb19f6 fix: wake app for call pushes 2026-09-18 13:51:22 +08:00
richjohnrambo 153f541078 fix: add call push category 2026-09-18 13:38:57 +08:00
richjohnrambo 192bdede33 fix: route call accept across pods 2026-09-18 11:15:19 +08:00
Austin 4c809129eb Merge branch 'dev' of https://git.118im.com/im_team/im_server into dev 2026-09-18 10:56:00 +08:00
richjohnrambo 3a92d81fca feat: enforce friend add and curfew policies 2026-09-18 10:55:53 +08:00
Austin 7a52db3437 fix: auto-provision im_user_privacy_settings columns on startup
Zentao #24/#25: commit 50f8581 added friend_request_verification and group_invite_verification to userPrivacyByUID, but existing databases lack those columns, so GetPrivacy failed with Error 1054 and every cross-user profile/qrcodes/friend-request endpoint returned 500.

Add user_privacy_schema.go which, under GET_LOCK, checks information_schema and ALTERs in any missing privacy columns, wired into the root adapter Open() and per-tenant TenantAdapterFor so tenant-scoped databases are provisioned too.
2026-09-18 10:55:13 +08:00
richjohnrambo c6e7f6b923 feat: improve group member events and push delivery 2026-09-18 01:00:41 +08:00
richjohnrambo 0e2f4e73d1 refactor: remove workbench code from im server 2026-09-17 23:38:44 +08:00
richjohnrambo 69a777c81f feat: apply configured default user avatars 2026-09-17 21:36:19 +08:00
richjohnrambo b9aaccc830 fix: update uid encryption key defaults 2026-09-17 16:59:47 +08:00
richjohnrambo ac75caba86 fix: load uid key from manager config 2026-09-17 16:30:47 +08:00
richjohnrambo c8d9146604 fix: include username in me endpoint 2026-09-17 15:23:47 +08:00
richjohnrambo 50f8581667 fix: resolve im backend issue list regressions 2026-09-17 14:59:16 +08:00
richjohnrambo 760de35e10 fix: allow username-only registration without invite 2026-09-17 13:45:57 +08:00
richjohnrambo 8279ae577f fix: decouple meeting note upload binding 2026-09-17 13:38:55 +08:00
richjohnrambo 734e042af6 feat: expose account fields in user profiles 2026-09-17 13:37:34 +08:00
richjohnrambo 816be46e03 fix: fan out unread presence to online sessions 2026-09-17 10:24:39 +08:00
richjohnrambo 7df3313c78 fix: shorten session heartbeat interval to 15s 2026-09-17 00:16:14 +08:00
richjohnrambo 0f8e3b82b7 feat: enforce tenant content moderation 2026-09-16 22:21:25 +08:00
richjohnrambo 0ae4af0c31 fix: fan out receipts and align tenant schema 2026-09-16 22:09:52 +08:00
richjohnrambo 6729f40665 fix: sync topic sequence after server data 2026-09-16 16:21:53 +08:00
richjohnrambo 7461216c03 feat: merge registration invite and verification input 2026-09-16 14:29:59 +08:00
richjohnrambo 370e9878ed fix: notify p2p message mutation on user channel 2026-09-16 13:49:33 +08:00
richjohnrambo fa95dd72af fix: 后台登录审计查询按字符串返回用户ID 2026-09-16 13:39:50 +08:00
richjohnrambo 1038d25abd fix: 后台消息查询按字符串返回用户ID 2026-09-16 13:24:02 +08:00
Austin a01cdae971 fix(realtime): evict fanout 增加时效校验,防止延迟重放误踢新登录
deliverRealtimeSessionControl 分发前校验 Ctrl.Timestamp,超过 10s 的 session-control(evict)消息直接丢弃并记 skip_stale 指标,避免 consumer 重启重放 PEL / stream 积压时旧消息的 skipSid 与新会话不符导致新登录被误踢。无时间戳消息放行以兼容旧发布方。

验证:TestRealtime 3/3、regression_kick_notification 14/14、regression_mobile_kick 21/21。
2026-09-16 13:22:47 +08:00
richjohnrambo c0ab94723c fix: 后台用户查询按字符串返回用户ID 2026-09-16 13:10:37 +08:00
Austin 846615db69 Merge branch 'dev' of https://git.118im.com/im_team/im_server into dev 2026-09-16 10:23:33 +08:00
Austin 4280b535c2 feat(session): 实现同平台抢登互踢功能,优化会话踢下线逻辑
新增同平台会话踢下线能力,将iOS/Android/mobile归为同一移动分组,web仅匹配web;扩展会话存储接口支持按平台、带原因踢除会话,同步更新集群广播逻辑与各调用点,统一传递踢下线原因参数
2026-09-16 10:23:27 +08:00
richjohnrambo 68b196215f fix: keep upload urls unchanged 2026-09-16 09:56:15 +08:00
richjohnrambo 1de69fcc5b fix: force file urls to https 2026-09-16 09:52:55 +08:00
richjohnrambo 9626e8ee7c fix: invalidate group settings cache on membership changes 2026-09-16 01:03:40 +08:00
richjohnrambo 139681fadb feat: shard group messages by month 2026-09-15 23:53:51 +08:00
richjohnrambo b7c2536527 fix: persist group join system notices 2026-09-15 19:20:07 +08:00
Austin dbb0a06db0 fix: 修复P2P主题别名订阅的兼容性问题
1. 订阅重复检查新增Original与RcptTo匹配判断,避免别名订阅误判已订阅
2. 重构订阅get查询处理逻辑,提取为独立函数
3. 针对P2P别名订阅场景返回200响应而非304,帮助客户端完成别名到标准主题名的重命名,避免发布失败
4. 优化群摘要接口的权限校验和异常处理逻辑
2026-09-15 18:53:49 +08:00
richjohnrambo 563ae9ee5e fix: fanout p2p system notices to users 2026-09-15 17:58:55 +08:00
richjohnrambo e29b5d3589 test: cover blocked profile visibility 2026-09-15 16:02:36 +08:00
richjohnrambo 152e2402fa fix: allow members to query own group mute 2026-09-15 15:55:13 +08:00
richjohnrambo bc27a5c574 feat: add message mutation sync 2026-09-15 15:54:52 +08:00
Austin 55afd976c9 fix(server): 修复群组权限缓存与解散群问题
1. 新增group事件处理逻辑,实时刷新内存中的群组权限与状态
2. 加载topic时过滤已解散的群组,防止被旧成员恢复
3. 补充群成员离开事件的用户ID字段,完善事件处理
2026-09-15 15:18:14 +08:00
Austin 5dd0a42002 fix: harden message seq allocation against stale redis replicas
- use sentinel failover client for group message runtime when
  sentinel_master_name/sentinel_addrs are configured, so seq counter
  reads never hit a stale replica after failover
- re-seed missing redis seq counter from DB topic seqid instead of
  trusting the caller in-memory baseline
- on unique-key conflict during async persist, re-allocate seq from DB
  latest, bump redis counter and fix the idempotency record so resends
  with the same client mid return the final seq
- add uk(topic, seqid) unique keys for im_messages in tenant DDL
2026-09-15 12:41:38 +08:00