- Improve notification sender with bulk operations and fallback logic
- Enhance group cache with new methods for member counts and version handling
- Refactor group controller with better cache integration
- Add more robust error handling and logging
fix(group): optimize group cache implementation
This commit refactors the GroupCacheRedis implementation to improve code organization and maintainability. The changes include:
- Added proper import organization and removed unused imports
- Implemented batchGetCache2 function calls for efficient data retrieval
- Added comprehensive cache key management functions
- Improved version tracking for group members and requests
- Enhanced error handling and logging
- Added batch operations for better performance
- Refactored complex functions into smaller, more manageable pieces
The changes focus on improving the overall structure and performance of the group cache system while maintaining backward compatibility.
refactor(group): improve notification error handling and add admin context
- Convert notification methods to return errors for better error propagation
- Add admin context checking for bulk notifications
- Enhance group info retrieval with proper error handling
- Improve notification sender with fallback user information
fix(group): handle nil group member map in notification
Add nil check for groupMemberMap[groupInfo.GroupID] before accessing to prevent nil pointer panic. Skip iteration if map is nil.
refactor(group): update group notification methods to use UserInfo struct
Renamed function parameter from groupMemberUserID string to changedUserInfo *sdkws.UserInfo
Updated function logic to use changedUserInfo.UserID instead of separate parameter
Refactored notification methods to use consistent UserInfo struct pattern
Added proper error handling for opUser retrieval
Updated function signatures and internal logic for GroupMemberInfoSetNotificationBulk
fix: batchGetGroupRoleLevelMemberIDs with BatchCache
fix: GetGroupMemberNums BatchCache
perf(group): optimize notification logic for group member operations
# Conflicts:
# internal/rpc/group/group.go
# pkg/common/storage/cache/redis/group.go
* fix: performance issues with Kafka caused by encapsulating the MQ interface
* fix: admin token in standalone mode
* fix: full id version
* fix: resolve deadlock in cache eviction and improve GetBatch implementation
* refactor: replace LongConn with ClientConn interface and simplify message handling
* refactor: replace LongConn with ClientConn interface and simplify message handling
* fix: seq use $setOnInsert for min_seq in conversation update
* feat: add error code for handled friend requests and improve error handling in friend operations
* fix: performance issues with Kafka caused by encapsulating the MQ interface
* fix: admin token in standalone mode
* fix: full id version
* fix: resolve deadlock in cache eviction and improve GetBatch implementation
* refactor: replace LongConn with ClientConn interface and simplify message handling
* refactor: replace LongConn with ClientConn interface and simplify message handling
* fix: seq use $setOnInsert for min_seq in conversation update
* fix: performance issues with Kafka caused by encapsulating the MQ interface
* fix: admin token in standalone mode
* fix: full id version
* fix: resolve deadlock in cache eviction and improve GetBatch implementation
* feat: implement ratelimit and circuitbreaker in middleware.
* Build: Implement rate limiting and circuit breaker for API and RPC services.
* revert change.
* update ratelimiter and circuitbreaker config.
* update tools to openimsdk tools
* pb
* fix: Modifying other fields while setting IsPrivateChat does not take effect
* fix: quote message error revoke
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* upgrading pkg tools
* fix
* fix
* optimize log output
* feat: support GetLastMessage
* feat: support GetLastMessage
* feat: s3 switch
* feat: s3 switch
* fix: GetUsersOnline
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: seq conversion failed without exiting
* fix: DeleteDoc crash
* fix: fill send time
* fix: fill send time
* fix: crash caused by withdrawing messages from users who have left the group
* fix: user msg timestamp
* seq read config
* seq read config
* fix: the source message of the reference is withdrawn, and the referenced message is deleted
* feat: optimize the default notification.yml
* fix: shouldPushOffline
* fix: the sorting is wrong after canceling the administrator in group settings
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* fix: oss specifies content-type when uploading
* fix: the version number contains a line break
* fix: the version number contains a line break
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* fix: transferring the group owner to a muted member, incremental version error
* feat: unified conversion code
* feat: update gomake
* fix: in standalone mode, the user online status is wrong
* fix: add permission check
* fix: add permission check
* fix: add rpc interface permission check
* fix: CreateGroupChatConversations
* feat: optimize friend and group applications
* feat: optimize friend and group applications
* feat: optimize friend and group applications
* feat: optimize friend and group applications
* fix: optimize friend and group applications
* pb
* fix: Modifying other fields while setting IsPrivateChat does not take effect
* fix: quote message error revoke
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* upgrading pkg tools
* fix
* fix
* optimize log output
* feat: support GetLastMessage
* feat: support GetLastMessage
* feat: s3 switch
* feat: s3 switch
* fix: GetUsersOnline
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: seq conversion failed without exiting
* fix: DeleteDoc crash
* fix: fill send time
* fix: fill send time
* fix: crash caused by withdrawing messages from users who have left the group
* fix: user msg timestamp
* seq read config
* seq read config
* fix: the source message of the reference is withdrawn, and the referenced message is deleted
* feat: optimize the default notification.yml
* fix: shouldPushOffline
* fix: the sorting is wrong after canceling the administrator in group settings
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* fix: oss specifies content-type when uploading
* fix: the version number contains a line break
* fix: the version number contains a line break
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* fix: transferring the group owner to a muted member, incremental version error
* feat: unified conversion code
* feat: update gomake
* fix: in standalone mode, the user online status is wrong
* fix: add permission check
* fix: add permission check
* fix: add rpc interface permission check
* fix: CreateGroupChatConversations
* feat: optimize friend and group applications
* feat: optimize friend and group applications
* feat: optimize friend and group applications
* feat: optimize friend and group applications
* pb
* fix: Modifying other fields while setting IsPrivateChat does not take effect
* fix: quote message error revoke
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* upgrading pkg tools
* fix
* fix
* optimize log output
* feat: support GetLastMessage
* feat: support GetLastMessage
* feat: s3 switch
* feat: s3 switch
* fix: GetUsersOnline
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: seq conversion failed without exiting
* fix: DeleteDoc crash
* fix: fill send time
* fix: fill send time
* fix: crash caused by withdrawing messages from users who have left the group
* fix: user msg timestamp
* seq read config
* seq read config
* fix: the source message of the reference is withdrawn, and the referenced message is deleted
* feat: optimize the default notification.yml
* fix: shouldPushOffline
* fix: the sorting is wrong after canceling the administrator in group settings
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* fix: oss specifies content-type when uploading
* fix: the version number contains a line break
* fix: the version number contains a line break
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* fix: transferring the group owner to a muted member, incremental version error
* feat: unified conversion code
* feat: update gomake
* fix: in standalone mode, the user online status is wrong
* fix: add permission check
* fix: add permission check
* pb
* fix: Modifying other fields while setting IsPrivateChat does not take effect
* fix: quote message error revoke
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* upgrading pkg tools
* fix
* fix
* optimize log output
* feat: support GetLastMessage
* feat: support GetLastMessage
* feat: s3 switch
* feat: s3 switch
* fix: GetUsersOnline
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: seq conversion failed without exiting
* fix: DeleteDoc crash
* fix: fill send time
* fix: fill send time
* fix: crash caused by withdrawing messages from users who have left the group
* fix: user msg timestamp
* seq read config
* seq read config
* fix: the source message of the reference is withdrawn, and the referenced message is deleted
* feat: optimize the default notification.yml
* fix: shouldPushOffline
* fix: the sorting is wrong after canceling the administrator in group settings
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* fix: oss specifies content-type when uploading
* fix: the version number contains a line break
* fix: the version number contains a line break
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* fix: transferring the group owner to a muted member, incremental version error
* feat: unified conversion code
* feat: update gomake
* fix: in standalone mode, the user online status is wrong
* pb
* fix: Modifying other fields while setting IsPrivateChat does not take effect
* fix: quote message error revoke
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* upgrading pkg tools
* fix
* fix
* optimize log output
* feat: support GetLastMessage
* feat: support GetLastMessage
* feat: s3 switch
* feat: s3 switch
* fix: GetUsersOnline
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: seq conversion failed without exiting
* fix: DeleteDoc crash
* fix: fill send time
* fix: fill send time
* fix: crash caused by withdrawing messages from users who have left the group
* fix: user msg timestamp
* seq read config
* seq read config
* fix: the source message of the reference is withdrawn, and the referenced message is deleted
* feat: optimize the default notification.yml
* fix: shouldPushOffline
* fix: the sorting is wrong after canceling the administrator in group settings
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* fix: oss specifies content-type when uploading
* fix: the version number contains a line break
* fix: the version number contains a line break
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* fix: transferring the group owner to a muted member, incremental version error
* feat: unified conversion code
* feat: update gomake
* feat: grpc mw
* fix: permission verification
* fix: optimizing the code
* fix: optimize grpc option and fix some interface permission checks
* pb
* fix: Modifying other fields while setting IsPrivateChat does not take effect
* fix: quote message error revoke
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* upgrading pkg tools
* fix
* fix
* optimize log output
* feat: support GetLastMessage
* feat: support GetLastMessage
* feat: s3 switch
* feat: s3 switch
* fix: GetUsersOnline
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: seq conversion failed without exiting
* fix: DeleteDoc crash
* fix: fill send time
* fix: fill send time
* fix: crash caused by withdrawing messages from users who have left the group
* fix: user msg timestamp
* seq read config
* seq read config
* fix: the source message of the reference is withdrawn, and the referenced message is deleted
* feat: optimize the default notification.yml
* fix: shouldPushOffline
* fix: the sorting is wrong after canceling the administrator in group settings
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* fix: oss specifies content-type when uploading
* fix: the version number contains a line break
* fix: the version number contains a line break
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* fix: transferring the group owner to a muted member, incremental version error
* feat: unified conversion code
* feat: update gomake
* pb
* fix: Modifying other fields while setting IsPrivateChat does not take effect
* fix: quote message error revoke
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* upgrading pkg tools
* fix
* fix
* optimize log output
* feat: support GetLastMessage
* feat: support GetLastMessage
* feat: s3 switch
* feat: s3 switch
* fix: GetUsersOnline
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: seq conversion failed without exiting
* fix: DeleteDoc crash
* fix: fill send time
* fix: fill send time
* fix: crash caused by withdrawing messages from users who have left the group
* fix: user msg timestamp
* seq read config
* seq read config
* fix: the source message of the reference is withdrawn, and the referenced message is deleted
* feat: optimize the default notification.yml
* fix: shouldPushOffline
* fix: the sorting is wrong after canceling the administrator in group settings
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* fix: oss specifies content-type when uploading
* fix: the version number contains a line break
* fix: the version number contains a line break
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* fix: transferring the group owner to a muted member, incremental version error
* feat: GroupApplicationAgreeMemberEnterNotification splitting, rpc body size limit
* feat: GroupApplicationAgreeMemberEnterNotification splitting, rpc body size limit
* pb
* fix: Modifying other fields while setting IsPrivateChat does not take effect
* fix: quote message error revoke
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* upgrading pkg tools
* fix
* fix
* optimize log output
* feat: support GetLastMessage
* feat: support GetLastMessage
* feat: s3 switch
* feat: s3 switch
* fix: GetUsersOnline
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: seq conversion failed without exiting
* fix: DeleteDoc crash
* fix: fill send time
* fix: fill send time
* fix: crash caused by withdrawing messages from users who have left the group
* fix: user msg timestamp
* seq read config
* seq read config
* fix: the source message of the reference is withdrawn, and the referenced message is deleted
* feat: optimize the default notification.yml
* fix: shouldPushOffline
* fix: the sorting is wrong after canceling the administrator in group settings
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* fix: oss specifies content-type when uploading
* fix: the version number contains a line break
* fix: the version number contains a line break
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* feat: GetConversationsHasReadAndMaxSeq support pinned
* pb
* fix: Modifying other fields while setting IsPrivateChat does not take effect
* fix: quote message error revoke
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* upgrading pkg tools
* fix
* fix
* optimize log output
* feat: support GetLastMessage
* feat: support GetLastMessage
* feat: s3 switch
* feat: s3 switch
* fix: GetUsersOnline
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: seq conversion failed without exiting
* fix: DeleteDoc crash
* fix: fill send time
* fix: fill send time
* fix: crash caused by withdrawing messages from users who have left the group
* fix: user msg timestamp
* seq read config
* seq read config
* fix: the source message of the reference is withdrawn, and the referenced message is deleted
* feat: optimize the default notification.yml
* fix: shouldPushOffline
* fix: the sorting is wrong after canceling the administrator in group settings
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* fix: oss specifies content-type when uploading
* fix: the version number contains a line break
* fix: the version number contains a line break
* feat: support client config
* feat: support client config
* pb
* fix: Modifying other fields while setting IsPrivateChat does not take effect
* fix: quote message error revoke
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* refactoring scheduled tasks
* upgrading pkg tools
* fix
* fix
* optimize log output
* feat: support GetLastMessage
* feat: support GetLastMessage
* feat: s3 switch
* feat: s3 switch
* fix: GetUsersOnline
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: SendBusinessNotification supported configuration parameters
* feat: seq conversion failed without exiting
* fix: DeleteDoc crash
* fix: fill send time
* fix: fill send time
* fix: crash caused by withdrawing messages from users who have left the group
* fix: user msg timestamp
* seq read config
* seq read config
* fix: the source message of the reference is withdrawn, and the referenced message is deleted
* feat: optimize the default notification.yml
* fix: shouldPushOffline
* fix: the sorting is wrong after canceling the administrator in group settings
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* feat: Sending messages supports returning fields modified by webhook
* fix: oss specifies content-type when uploading
* fix: the version number contains a line break
* fix: the version number contains a line break
* feat: add a function for business info change to update related conversation's ex info.
* feat: add a function for business info change to update related conversation's ex info.
* feat: add a function for business info change to update related conversation's ex info.
* feat: add a function for business info change to update related conversation's ex info.
* feat: add a field to specify whether to send a notification message when creating a group.
* feat: add a field to specify whether to send a notification message when creating a group.
* refactor: change sendNotification to sendMessage to avoid ambiguity regarding message sending behavior.
---------
Co-authored-by: Monet Lee <monet_lee@163.com>
* feat: add a field to specify whether to send a notification message when creating a group.
* feat: add a field to specify whether to send a notification message when creating a group.
---------
Co-authored-by: Monet Lee <monet_lee@163.com>