dsx137 e674b85328 refactor(group): optimize group notification and cache handling
- 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

# Conflicts:
#	internal/rpc/group/group.go
#	pkg/common/storage/cache/redis/group.go
2026-03-20 10:57:26 +08:00
2025-11-14 15:06:49 +08:00
2024-04-24 12:11:24 +08:00
2024-04-22 16:31:11 +08:00
2024-07-16 02:46:21 +00:00
2024-04-24 12:11:24 +08:00
2023-07-10 18:19:25 +08:00
2026-03-19 12:07:04 +08:00
2026-03-19 12:07:04 +08:00
2023-06-29 22:35:31 +08:00
2026-03-19 12:07:04 +08:00
2024-07-24 06:50:02 +00:00
2024-07-24 06:50:02 +00:00
2024-09-12 02:38:17 +00:00

👥 Join Our Community

Ⓜ️ About OpenIM

Unlike standalone chat applications such as Telegram, Signal, and Rocket.Chat, OpenIM offers an open-source instant messaging solution designed specifically for developers rather than as a directly installable standalone chat app. Comprising OpenIM SDK and OpenIM Server, it provides developers with a complete set of tools and services to integrate instant messaging functions into their applications, including message sending and receiving, user management, and group management. Overall, OpenIM aims to provide developers with the necessary tools and framework to implement efficient instant messaging solutions in their applications.

App-OpenIM Relationship

🚀 Introduction to OpenIMSDK

OpenIMSDK, designed for OpenIMServer, is an IM SDK created specifically for integration into client applications. It supports various functionalities and modules:

  • 🌟 Main Features:

    • 📦 Local Storage
    • 🔔 Listener Callbacks
    • 🛡️ API Wrapping
    • 🌐 Connection Management
  • 📚 Main Modules:

    1. 🚀 Initialization and Login
    2. 👤 User Management
    3. 👫 Friends Management
    4. 🤖 Group Functions
    5. 💬 Session Handling

Built with Golang and supports cross-platform deployment to ensure a consistent integration experience across all platforms.

👉 Explore the GO SDK

🌐 Introduction to OpenIMServer

  • OpenIMServer features include:
    • 🌐 Microservices Architecture: Supports cluster mode, including a gateway and multiple rpc services.
    • 🚀 Diverse Deployment Options: Supports source code, Kubernetes, or Docker deployment.
    • Massive User Support: Supports large-scale groups with hundreds of thousands, millions of users, and billions of messages.

Enhanced Business Functions:

  • REST API: Provides a REST API for business systems to enhance functionality, such as group creation and message pushing through backend interfaces.

  • Webhooks: Expands business forms through callbacks, sending requests to business servers before or after certain events.

    Overall Architecture

🚀 Quick Start

Experience online for iOS/Android/H5/PC/Web:

👉 OpenIM Online Demo

To facilitate user experience, we offer various deployment solutions. You can choose your preferred deployment method from the list below:

System Support

Supports Linux, Windows, Mac systems, and ARM and AMD CPU architectures.

✍️ How to Contribute

We welcome contributions of any kind! Please make sure to read our Contributor Documentation before submitting a Pull Request.

Thank you for contributing to building a powerful instant messaging solution!

📕 License

OpenIMSDK is available under the Apache License 2.0. See the LICENSE file for more information.

🔮 Thanks to our contributors!

Languages
Go 97.4%
Shell 1.4%
Dockerfile 1.2%