Compare commits

..

12 Commits

Author SHA1 Message Date
dsx137 2439736830 Update CHANGELOG for release v3.8.3-patch.16 2026-03-19 07:24:54 +00:00
dsx137 d16a617ba8 feat: gomake upgrade (#3702) 2026-03-19 04:09:02 +00:00
icey-yu 942d155d2d feat: update protocol support botPlatform (#3696) 2026-03-11 05:44:36 +00:00
chao b7200c163c feat: add error code for handled friend requests and improve error handling in friend operations (#3670)
* 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
2026-01-22 08:34:00 +00:00
神奇bug在哪里 579db3bd48 bugfix(conversation):removed unexpectedly called functions and itself to avoid out of index query. (#3668)
# Conflicts:
#	internal/rpc/conversation/conversation.go
#	pkg/common/storage/database/mgo/conversation.go
2026-01-21 10:10:29 +00:00
chao a0e6d9aa69 fix: Mongo Malloc upsert overwrites min_seq initialization (#3657)
* 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
2026-01-15 06:24:17 +00:00
dsx137 fbca49d431 fix(group): set max_seq to 0 when join group (#3649) 2025-12-31 10:02:38 +00:00
dsx137 0a93fb1b6d fix(group): move member count retrieval after member deletion for accurate updates (#3651) 2025-12-31 10:01:51 +00:00
chao 78b255396f feat: replace LongConn with ClientConn interface and simplify message handling (#3643)
* 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
2025-12-25 08:27:16 +00:00
ribin2333 6f33c0a515 fix: reset user conversation seq when rejoining group to resolve message recall issue (#3640)
* fix: reset user conversation seq when rejoining group to resolve message recall issue

* fix: refactor setMemberJoinSeq based on review feedback

* group: 入群个人上限重置为不受限值;退出个人上限固化;通知控制入群 minSeq
2025-12-23 06:37:32 +00:00
Gagan Singh c97d63754b Simplify iOS background push gating (#3611) (#3612) 2025-12-15 09:16:29 +00:00
chao 1b8a3b0b75 fix: resolve deadlock in cache eviction and improve GetBatch implementation and full id version (#3591)
* 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
2025-12-12 08:24:39 +00:00
18 changed files with 379 additions and 222 deletions
+238 -60
View File
@@ -1,70 +1,248 @@
## [v3.8.3-patch.6](https://github.com/openimsdk/open-im-server/releases/tag/v3.8.3-patch.6) (2025-07-23)
### Bug Fixes
* fix: Add friend DB in notification sender [#3438](https://github.com/openimsdk/open-im-server/pull/3438)
* fix: remove update version file workflows have new line in 3.8.3-patch branch. [#3452](https://github.com/openimsdk/open-im-server/pull/3452)
* fix: s3 aws init [#3454](https://github.com/openimsdk/open-im-server/pull/3454)
* fix: use safe submodule init in workflows in v3.8.3-patch. [#3469](https://github.com/openimsdk/open-im-server/pull/3469)
**Full Changelog**: [v3.8.3-patch.5...v3.8.3-patch.6](https://github.com/openimsdk/open-im-server/compare/v3.8.3-patch.5...v3.8.3-patch.6)
## [v3.8.3-patch.5](https://github.com/openimsdk/open-im-server/releases/tag/v3.8.3-patch.5) (2025-06-10)
## [v3.8.3-patch.16](https://github.com/openimsdk/open-im-server/releases/tag/v3.8.3-patch.16) (2026-03-19)
### New Features
* feat: optimize friend and group applications [#3396](https://github.com/openimsdk/open-im-server/pull/3396)
* feat: provide the interface required [#2712](https://github.com/openimsdk/open-im-server/pull/2712)
* feat: add webhooks of online status and remove zookeeper configuration. [#2716](https://github.com/openimsdk/open-im-server/pull/2716)
* feat: Add More Multi Login Policy [#2770](https://github.com/openimsdk/open-im-server/pull/2770)
* feat: Push configuration can ignore case sensitivity [#2775](https://github.com/openimsdk/open-im-server/pull/2775)
* feat: support app update service [#2794](https://github.com/openimsdk/open-im-server/pull/2794)
* feat: implement merge milestone PR to target-branch. [#2796](https://github.com/openimsdk/open-im-server/pull/2796)
* feat: support app update service [#2811](https://github.com/openimsdk/open-im-server/pull/2811)
* feat: ApplicationVersion move chat [#2813](https://github.com/openimsdk/open-im-server/pull/2813)
* feat: Update login policy [#2822](https://github.com/openimsdk/open-im-server/pull/2822)
* feat: support stream message [#2824](https://github.com/openimsdk/open-im-server/pull/2824)
* feat: merge js sdk [#2856](https://github.com/openimsdk/open-im-server/pull/2856)
* feat: Print Panic Log [#2850](https://github.com/openimsdk/open-im-server/pull/2850)
* feat: seq user and conversation seq synchronization [#2924](https://github.com/openimsdk/open-im-server/pull/2924)
* feat: support aws [#2938](https://github.com/openimsdk/open-im-server/pull/2938)
* feat: Prometheus can auto set port [#2943](https://github.com/openimsdk/open-im-server/pull/2943)
* feat: Change upload logs systemType to AppFramework. [#2927](https://github.com/openimsdk/open-im-server/pull/2927)
* feat: support quote ContentType in SendMsg. [#2819](https://github.com/openimsdk/open-im-server/pull/2819)
* feat: Group Monitoring Components, Enable Host Mode && Deprecate reliabilityLevel and unreadCount in notification.yml [#2975](https://github.com/openimsdk/open-im-server/pull/2975)
* feat: Add node_exporter in docker-compose [#2979](https://github.com/openimsdk/open-im-server/pull/2979)
* feat: Optimize Scheduled Task [#2985](https://github.com/openimsdk/open-im-server/pull/2985)
* feat: Optimizing RPC call [#2993](https://github.com/openimsdk/open-im-server/pull/2993)
* feat: optimize error stack information [#2995](https://github.com/openimsdk/open-im-server/pull/2995)
* feat: config center [#2997](https://github.com/openimsdk/open-im-server/pull/2997)
* feat: support message cache [#3007](https://github.com/openimsdk/open-im-server/pull/3007)
* feat: optimize log output [#3026](https://github.com/openimsdk/open-im-server/pull/3026)
* feat: support GetLastMessage [#3029](https://github.com/openimsdk/open-im-server/pull/3029)
* feat: Add enable config center button && fix: grpc connection leakage [#3036](https://github.com/openimsdk/open-im-server/pull/3036)
* feat: change appNotificationAccount to appManagerAccount && fix: enable config center add env check && fix: error return [#3038](https://github.com/openimsdk/open-im-server/pull/3038)
* feat: SendBusinessNotification supported configuration parameters [#3048](https://github.com/openimsdk/open-im-server/pull/3048)
* feat: add backup volume && optimize log print [#3066](https://github.com/openimsdk/open-im-server/pull/3066)
* feat: optimize code and support running in single process mode [#3142](https://github.com/openimsdk/open-im-server/pull/3142)
* feat: Change after webhook filter && feat SendSimpleMsg [#3151](https://github.com/openimsdk/open-im-server/pull/3151)
* feat: the default notification.yml is not configured properly [#3168](https://github.com/openimsdk/open-im-server/pull/3168)
* feat: add a new message type: Markdown text [#3162](https://github.com/openimsdk/open-im-server/pull/3162)
* feat: add a field to specify whether to send a notification message w… [#3163](https://github.com/openimsdk/open-im-server/pull/3163)
* feat: optimizing BatchGetIncrementalGroupMember [#3180](https://github.com/openimsdk/open-im-server/pull/3180)
* feat: system account send msg doesn't need friend verify [#3187](https://github.com/openimsdk/open-im-server/pull/3187)
* feat: sending messages supports returning fields modified [#3192](https://github.com/openimsdk/open-im-server/pull/3192)
* feat: set configs api [#3183](https://github.com/openimsdk/open-im-server/pull/3183)
* feat: check if the secret in config/share.yml has been changed during registration [#3223](https://github.com/openimsdk/open-im-server/pull/3223)
* feat: Implement webhook in createConversation [#3228](https://github.com/openimsdk/open-im-server/pull/3228)
* feat: add a function for business info change to update related conve… [#3225](https://github.com/openimsdk/open-im-server/pull/3225)
* feat: add filtering for invalid messages and invalid conversations to… [#3239](https://github.com/openimsdk/open-im-server/pull/3239)
* feat: implement stress-test tools. [#3261](https://github.com/openimsdk/open-im-server/pull/3261)
* feat: support server-issued configuration, which can be set for individual users [#3271](https://github.com/openimsdk/open-im-server/pull/3271)
* feat: GetConversationsHasReadAndMaxSeq support pinned [#3281](https://github.com/openimsdk/open-im-server/pull/3281)
* feat: Implement stress test v2. [#3292](https://github.com/openimsdk/open-im-server/pull/3292)
* feat: GroupApplicationAgreeMemberEnterNotification splitting [#3297](https://github.com/openimsdk/open-im-server/pull/3297)
* feat: optimize server code [#3319](https://github.com/openimsdk/open-im-server/pull/3319)
* feat: add rpc interface permission check [#3366](https://github.com/openimsdk/open-im-server/pull/3366)
* feat: optimize friend and group applications [#3384](https://github.com/openimsdk/open-im-server/pull/3384)
* feat: support distributed lock in crontask. [#3401](https://github.com/openimsdk/open-im-server/pull/3401)
* feat: Implement etcd and kafka auth. [#3394](https://github.com/openimsdk/open-im-server/pull/3394)
* feat: support redis sentinel. [#3423](https://github.com/openimsdk/open-im-server/pull/3423)
* feat: add api logger [#3427](https://github.com/openimsdk/open-im-server/pull/3427)
* feat: add nickname for adminUser [#3435](https://github.com/openimsdk/open-im-server/pull/3435)
* feat: support mongo replicaset mode. [#3433](https://github.com/openimsdk/open-im-server/pull/3433)
* feat: enable redis aof-use-rdb-preamble && disable auto rdb [#3529](https://github.com/openimsdk/open-im-server/pull/3529)
* feat: implement auth local cache. [#3533](https://github.com/openimsdk/open-im-server/pull/3533)
* feat: add msgDBSave webhook when data save to DB. [#3578](https://github.com/openimsdk/open-im-server/pull/3578)
* feat: implement DeleteConversations interface. [#3549](https://github.com/openimsdk/open-im-server/pull/3549)
* feat: replace LongConn with ClientConn interface and simplify message handling [#3643](https://github.com/openimsdk/open-im-server/pull/3643)
* feat: add error code for handled friend requests and improve error handling in friend operations [#3670](https://github.com/openimsdk/open-im-server/pull/3670)
* feat: update protocol support botPlatform [#3696](https://github.com/openimsdk/open-im-server/pull/3696)
* feat: gomake upgrade [#3702](https://github.com/openimsdk/open-im-server/pull/3702)
### Bug Fixes
* fix: solve unocrrect invite notification [Created [#3219](https://github.com/openimsdk/open-im-server/pull/3219)
* fix: the message I sent is not set to read seq in mongodb [#2718](https://github.com/openimsdk/open-im-server/pull/2718)
* fix: cannot modify group member avatars [#2719](https://github.com/openimsdk/open-im-server/pull/2719)
* fix: auth package import twice [#2724](https://github.com/openimsdk/open-im-server/pull/2724)
* fix: join the group chat directly, notification type error [#2772](https://github.com/openimsdk/open-im-server/pull/2772)
* fix: change update group member level logic [#2730](https://github.com/openimsdk/open-im-server/pull/2730)
* fix: joinSource check args error. [#2773](https://github.com/openimsdk/open-im-server/pull/2773)
* fix: Change group member roleLevel can`t send notification [#2777](https://github.com/openimsdk/open-im-server/pull/2777)
* fix: client sends message status error to server [#2779](https://github.com/openimsdk/open-im-server/pull/2779)
* fix: del UserB's conversation version cache when userA set conversati… [#2785](https://github.com/openimsdk/open-im-server/pull/2785)
* fix: improve setConversationAtInfo logic. [#2782](https://github.com/openimsdk/open-im-server/pull/2782)
* fix: improve transfer Owner logic when newOwner is mute. [#2790](https://github.com/openimsdk/open-im-server/pull/2790)
* fix: improve getUserInfo logic. [#2792](https://github.com/openimsdk/open-im-server/pull/2792)
* fix: improve time condition check mehtod. [#2804](https://github.com/openimsdk/open-im-server/pull/2804)
* fix: webhook before online push [#2805](https://github.com/openimsdk/open-im-server/pull/2805)
* fix: set own read seq in MongoDB when sender send a message. [#2808](https://github.com/openimsdk/open-im-server/pull/2808)
* fix: solve err Notification when setGroupInfo. [#2806](https://github.com/openimsdk/open-im-server/pull/2806)
* fix: improve condition check. [#2815](https://github.com/openimsdk/open-im-server/pull/2815)
* fix: Write back message to Redis [#2836](https://github.com/openimsdk/open-im-server/pull/2836)
* fix: get group return repeated result [#2842](https://github.com/openimsdk/open-im-server/pull/2842)
* fix: SetConversations can update new conversation [#2838](https://github.com/openimsdk/open-im-server/pull/2838)
* fix(push): push content with jpush [#2844](https://github.com/openimsdk/open-im-server/pull/2844)
* fix #2860 migrate jpns to jpush [#2861](https://github.com/openimsdk/open-im-server/pull/2861)
* fix: concurrent write to websocket connection [#2866](https://github.com/openimsdk/open-im-server/pull/2866)
* fix: Remove admin token in redis [#2871](https://github.com/openimsdk/open-im-server/pull/2871)
* Fix Push2User webhookBeforeOfflinePush [#2862](https://github.com/openimsdk/open-im-server/pull/2862)
* fix: move workflow to correct path [#2837](https://github.com/openimsdk/open-im-server/pull/2837)
* fix: del login Policy [#2825](https://github.com/openimsdk/open-im-server/pull/2825)
* fix: Wrong Redis Error Check [#2876](https://github.com/openimsdk/open-im-server/pull/2876)
* fix: minor log typo [#2881](https://github.com/openimsdk/open-im-server/pull/2881)
* fix: webhookAfterSingleMsgRead will be called correctly [#2884](https://github.com/openimsdk/open-im-server/pull/2884)
* fix: webhookBeforeSendSingleMsg will call before black and friend check [#2885](https://github.com/openimsdk/open-im-server/pull/2885)
* fix: Wrong Redis Error Check [#2891](https://github.com/openimsdk/open-im-server/pull/2891)
* fix: improve crontask delete outdated Data. [#2901](https://github.com/openimsdk/open-im-server/pull/2901)
* fix: go mod [#2906](https://github.com/openimsdk/open-im-server/pull/2906)
* fix: group member update face_url [#2910](https://github.com/openimsdk/open-im-server/pull/2910)
* fix: update set seq implement. [#2911](https://github.com/openimsdk/open-im-server/pull/2911)
* fix https://github.com/openimsdk/open-im-server/issues/2895 [#2896](https://github.com/openimsdk/open-im-server/pull/2896)
* fix: Can choose whether to set the port. [#2929](https://github.com/openimsdk/open-im-server/pull/2929)
* fix: Configure move service discovery into discovery [#2934](https://github.com/openimsdk/open-im-server/pull/2934)
* fix: compilation failed under Windows [#2940](https://github.com/openimsdk/open-im-server/pull/2940)
* fix: server can return isEnd to control fetch messages when sdk pull … [#2949](https://github.com/openimsdk/open-im-server/pull/2949)
* fix:Only print panic function frame && feat: log.ZPanic [#2947](https://github.com/openimsdk/open-im-server/pull/2947)
* fix: seq user and conversation seq synchronization [#2958](https://github.com/openimsdk/open-im-server/pull/2958)
* fix: fetch message return isEnd and endSeq panic. [#2959](https://github.com/openimsdk/open-im-server/pull/2959)
* fix: rpc panic recover [#2957](https://github.com/openimsdk/open-im-server/pull/2957)
* fix: modifying other fields while setting IsPrivateChat does not take effect [#2972](https://github.com/openimsdk/open-im-server/pull/2972)
* fix: when fetching a referenced message, it indicates that the original message has been deleted. [#2977](https://github.com/openimsdk/open-im-server/pull/2977)
* fix: when unable EnableHistoryForNewMembers, new group member can read last one message. [#3001](https://github.com/openimsdk/open-im-server/pull/3001)
* fix: redis save error when KickTokens [#3002](https://github.com/openimsdk/open-im-server/pull/3002)
* fix: The message @ information will be set only for members in the gr… [#3009](https://github.com/openimsdk/open-im-server/pull/3009)
* fix: restart permission check [#3011](https://github.com/openimsdk/open-im-server/pull/3011)
* fix: The system cannot be restarted the first time the configuration is set. [#3013](https://github.com/openimsdk/open-im-server/pull/3013)
* fix: jssdk not init [#3016](https://github.com/openimsdk/open-im-server/pull/3016)
* fix: online status error [#3022](https://github.com/openimsdk/open-im-server/pull/3022)
* fix: GetUsersOnline returns an error in the online list [#3040](https://github.com/openimsdk/open-im-server/pull/3040)
* fix: seq conversion failed without exiting [#3052](https://github.com/openimsdk/open-im-server/pull/3052)
* fix: check error in BatchSetTokenMapByUidPid [#3076](https://github.com/openimsdk/open-im-server/pull/3076)
* fix: DeleteDoc crash [#3078](https://github.com/openimsdk/open-im-server/pull/3078)
* fix: the abnormal message has no sending time, causing the SDK to be abnormal [#3087](https://github.com/openimsdk/open-im-server/pull/3087)
* fix: crash caused [#3100](https://github.com/openimsdk/open-im-server/pull/3100)
* fix: the user sets the conversation timer cleanup timestamp unit incorrectly [#3102](https://github.com/openimsdk/open-im-server/pull/3102)
* fix: solve workflows stop when merge failed [#3106](https://github.com/openimsdk/open-im-server/pull/3106)
* fix: seq conversion not reading env in docker environment [#3130](https://github.com/openimsdk/open-im-server/pull/3130)
* fix: the source message of the reference is withdrawn, and the referenced message is deleted [#3137](https://github.com/openimsdk/open-im-server/pull/3137)
* fix: Offline push does not have a badge && Android offline push [#3146](https://github.com/openimsdk/open-im-server/pull/3146)
* fix: PCAndOther multi login policy can`t get old clients correctly [#3158](https://github.com/openimsdk/open-im-server/pull/3158)
* fix: solve uncorrect notification when set group info [#3172](https://github.com/openimsdk/open-im-server/pull/3172)
* fix: the sorting is wrong after canceling the administrator in group settings [#3185](https://github.com/openimsdk/open-im-server/pull/3185)
* fix: solve uncorrect GroupMember enter group notification type. [#3188](https://github.com/openimsdk/open-im-server/pull/3188)
* fix: solve unocrrect invite notification [#3213](https://github.com/openimsdk/open-im-server/pull/3213)
* fix: AdminToken save to redis && limit 1 for each userID [#3224](https://github.com/openimsdk/open-im-server/pull/3224)
* fix: improve stress test tools parms. [#3265](https://github.com/openimsdk/open-im-server/pull/3265)
* fix: oss specifies content-type when uploading [#3267](https://github.com/openimsdk/open-im-server/pull/3267)
* fix: transferring the group owner to a muted member, incremental version error [#3284](https://github.com/openimsdk/open-im-server/pull/3284)
* fix: group status in GroupDismissedNotification [#3286](https://github.com/openimsdk/open-im-server/pull/3286)
* fix: data version SetVersion will add record [#3304](https://github.com/openimsdk/open-im-server/pull/3304)
* fix: delete token [#3313](https://github.com/openimsdk/open-im-server/pull/3313)
* fix: optimize grpc option and fix some interface permission checks [#3327](https://github.com/openimsdk/open-im-server/pull/3327)
* fix: standalone mode cannot be used [#3360](https://github.com/openimsdk/open-im-server/pull/3360)
* fix: solve user not found when notification invitedUserID is zero in … [#3375](https://github.com/openimsdk/open-im-server/pull/3375)
* fix: send simple msg [#3362](https://github.com/openimsdk/open-im-server/pull/3362)
* fix: solve updateUserInfoEx null pointer. [#3326](https://github.com/openimsdk/open-im-server/pull/3326)
* fix: add rpc interface permission check [#3377](https://github.com/openimsdk/open-im-server/pull/3377)
* fix: optimize friend and group applications [#3389](https://github.com/openimsdk/open-im-server/pull/3389)
* fix redis config db field [#3395](https://github.com/openimsdk/open-im-server/pull/3395)
* fix: prometheus discovery [#3408](https://github.com/openimsdk/open-im-server/pull/3408)
* fix: import friends send notification [#3420](https://github.com/openimsdk/open-im-server/pull/3420)
* fix: improve mileston PR workflows contents. [#3382](https://github.com/openimsdk/open-im-server/pull/3382)
* fix: solve webhook incorrect attentionID references. [#3411](https://github.com/openimsdk/open-im-server/pull/3411)
* fix: solve `createTime` not set in setConversation and Create Conversation. [#3447](https://github.com/openimsdk/open-im-server/pull/3447)
* fix: update log level in crontask dist look. [#3440](https://github.com/openimsdk/open-im-server/pull/3440)
* fix: use safe submodule init in workflows. [#3468](https://github.com/openimsdk/open-im-server/pull/3468)
* fix: fix incorrect kicked logic. [#3480](https://github.com/openimsdk/open-im-server/pull/3480)
* fix: added AtUserIDList to the @ message for API sending. [#3472](https://github.com/openimsdk/open-im-server/pull/3472)
* fix: solve batch incorrect error in Find DocIDs [#3476](https://github.com/openimsdk/open-im-server/pull/3476)
* fix: correctly aggregate read seqs [#3442](https://github.com/openimsdk/open-im-server/pull/3442)
* fix: performance issues with Kafka caused [#3485](https://github.com/openimsdk/open-im-server/pull/3485)
* fix: searchMessage method has potential NPE bug [Created [#3289](https://github.com/openimsdk/open-im-server/pull/3289)
* fix: admin token in standalone mode [#3499](https://github.com/openimsdk/open-im-server/pull/3499)
* fix: revert contentType in API msg [#3509](https://github.com/openimsdk/open-im-server/pull/3509)
* fix: optimize to lru local cache. [#3514](https://github.com/openimsdk/open-im-server/pull/3514)
* fix: fill in the most recent sendTime for a gap message to prevent th… [#3522](https://github.com/openimsdk/open-im-server/pull/3522)
* fix: solve incorrect batchGetIncrGroupMember when group dismissed. [#3526](https://github.com/openimsdk/open-im-server/pull/3526)
* fix: GetSortedConversationList nil pointer when chatlog not found. [#3531](https://github.com/openimsdk/open-im-server/pull/3531)
* fix: switch kafka & etcd image namespace to bitnamilegacy [#3555](https://github.com/openimsdk/open-im-server/pull/3555)
* fix: solve incorrect time.Unix and logger asyncwrite [#3584](https://github.com/openimsdk/open-im-server/pull/3584)
* fix: db manager [#3600](https://github.com/openimsdk/open-im-server/pull/3600)
* fix: update JSON field names to camelCase in conversation structs [#3609](https://github.com/openimsdk/open-im-server/pull/3609)
* Fix: Resolved the issue of incorrect generation of conversationID [#3581](https://github.com/openimsdk/open-im-server/pull/3581)
* fix: solve msg wsHandler panic. [#3595](https://github.com/openimsdk/open-im-server/pull/3595)
* fix: resolve deadlock in cache eviction and improve GetBatch implementation and full id version [#3591](https://github.com/openimsdk/open-im-server/pull/3591)
* fix: reset user conversation seq when rejoining group to resolve message recall issue [#3640](https://github.com/openimsdk/open-im-server/pull/3640)
* fix(group): move member count retrieval after member deletion for accurate updates [#3651](https://github.com/openimsdk/open-im-server/pull/3651)
* fix(group): set max_seq to 0 when join group [#3649](https://github.com/openimsdk/open-im-server/pull/3649)
* fix: Mongo Malloc upsert overwrites min_seq initialization [#3657](https://github.com/openimsdk/open-im-server/pull/3657)
### Builds
* build: update gomake version in dockerfile.[Patch branch] [#3416](https://github.com/openimsdk/open-im-server/pull/3416)
**Full Changelog**: [v3.8.3...v3.8.3-patch.5](https://github.com/openimsdk/open-im-server/compare/v3.8.3...v3.8.3-patch.5)
## [v3.8.3-patch.4](https://github.com/openimsdk/open-im-server/releases/tag/v3.8.3-patch.4) (2025-03-13)
### Bug Fixes
* fix: solve unocrrect invite notificationfrom #3213
**Full Changelog**: [v3.8.3-patch.3...v3.8.3-patch.4](https://github.com/openimsdk/open-im-server/compare/v3.8.3-patch.3...v3.8.3-patch.4)
## [v3.8.3-patch.3](https://github.com/openimsdk/open-im-server/releases/tag/v3.8.3-patch.3) (2025-03-07)
### New Features
* feat: optimizing BatchGetIncrementalGroupMember #3180
### Bug Fixes
* fix: solve uncorrect notification when set group info #3172
* fix: the sorting is wrong after canceling the administrator in group settings #3185
* fix: solve uncorrect GroupMember enter group notification type. #3188
### Chores
* chore: remove unused content [#2786](https://github.com/openimsdk/open-im-server/pull/2786)
* chore: update admin front image version [#2893](https://github.com/openimsdk/open-im-server/pull/2893)
### Refactors
* refactor: change sendNotification to sendMessage to avoid ambiguity regarding message sending behavior. #3173
**Full Changelog**: [v3.8.3-patch.2...v3.8.3-patch.3](https://github.com/openimsdk/open-im-server/compare/v3.8.3-patch.2...v3.8.3-patch.3)
## [v3.8.3-patch.2](https://github.com/openimsdk/open-im-server/releases/tag/v3.8.3-patch.2) (2025-02-28)
### Bug Fixes
* fix: Offline push does not have a badge && Android offline push (#3146) [#3174](https://github.com/openimsdk/open-im-server/pull/3174)
**Full Changelog**: [v3.8.3-patch.1...v3.8.3-patch.2](https://github.com/openimsdk/open-im-server/compare/v3.8.3-patch.1...v3.8.3-patch.2)
## [v3.8.3-patch.1](https://github.com/openimsdk/open-im-server/releases/tag/v3.8.3-patch.1) (2025-02-25)
### New Features
* feat: add backup volume && optimize log print [Created [#3121](https://github.com/openimsdk/open-im-server/pull/3121)
### Bug Fixes
* fix: seq conversion failed without exiting [Created [#3120](https://github.com/openimsdk/open-im-server/pull/3120)
* fix: check error in BatchSetTokenMapByUidPid [Created [#3123](https://github.com/openimsdk/open-im-server/pull/3123)
* fix: DeleteDoc crash [Created [#3124](https://github.com/openimsdk/open-im-server/pull/3124)
* fix: the abnormal message has no sending time, causing the SDK to be abnormal [Created [#3126](https://github.com/openimsdk/open-im-server/pull/3126)
* fix: crash caused [#3127](https://github.com/openimsdk/open-im-server/pull/3127)
* fix: the user sets the conversation timer cleanup timestamp unit incorrectly [Created [#3128](https://github.com/openimsdk/open-im-server/pull/3128)
* fix: seq conversion not reading env in docker environment [Created [#3131](https://github.com/openimsdk/open-im-server/pull/3131)
* refactor: Refactor rpc call && auto gen rpc_call code [#2969](https://github.com/openimsdk/open-im-server/pull/2969)
* refactor: improve workflows logic. [#3072](https://github.com/openimsdk/open-im-server/pull/3072)
* refactor: change sendNotification to sendMessage to avoid ambiguity regarding message sending behavior. [#3173](https://github.com/openimsdk/open-im-server/pull/3173)
* refactor: improve setConversations method. [#3194](https://github.com/openimsdk/open-im-server/pull/3194)
* refactor: move stress-test tools location. [#3295](https://github.com/openimsdk/open-im-server/pull/3295)
* refactor: support modified config and args in mage. [#3466](https://github.com/openimsdk/open-im-server/pull/3466)
### Builds
* build: improve workflows contents. [Created [#3125](https://github.com/openimsdk/open-im-server/pull/3125)
* build: improve workflows logic. [#2801](https://github.com/openimsdk/open-im-server/pull/2801)
* build: implement version file update when release. [#2826](https://github.com/openimsdk/open-im-server/pull/2826)
* build: update mongo and kafka start logic. [#2858](https://github.com/openimsdk/open-im-server/pull/2858)
* build: create changelog tool and workflows. [#2869](https://github.com/openimsdk/open-im-server/pull/2869)
* build(deps): bump github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.1 [#2851](https://github.com/openimsdk/open-im-server/pull/2851)
* build: update Server version. [#2887](https://github.com/openimsdk/open-im-server/pull/2887)
* build: implement services image build and CI release. [#2920](https://github.com/openimsdk/open-im-server/pull/2920)
* build: update kubernetes deployment Run. [#2919](https://github.com/openimsdk/open-im-server/pull/2919)
* build: fix uncorrect path. [#3020](https://github.com/openimsdk/open-im-server/pull/3020)
* build: fix docker images build. [#3024](https://github.com/openimsdk/open-im-server/pull/3024)
* build: keep conflict is true. [#3103](https://github.com/openimsdk/open-im-server/pull/3103)
* build: comment out admin services. [#3537](https://github.com/openimsdk/open-im-server/pull/3537)
* build: improve publish docker image workflow. [#3552](https://github.com/openimsdk/open-im-server/pull/3552)
* build: add sdk version log in registerClient [#3574](https://github.com/openimsdk/open-im-server/pull/3574)
### Others
* Revert: Change group member roleLevel can`t send notification [#2789](https://github.com/openimsdk/open-im-server/pull/2789)
* Introducing OpenIM Guru on Gurubase.io [#2788](https://github.com/openimsdk/open-im-server/pull/2788)
* revert: write msg to redis [#2883](https://github.com/openimsdk/open-im-server/pull/2883)
* Add a lead time for the token's issuance time. [#2914](https://github.com/openimsdk/open-im-server/pull/2914)
* docs: improve deployment docs in kubernetes. [#2973](https://github.com/openimsdk/open-im-server/pull/2973)
* update: env image version [#3055](https://github.com/openimsdk/open-im-server/pull/3055)
* License [#3293](https://github.com/openimsdk/open-im-server/pull/3293)
* docs: update slack link. [#3479](https://github.com/openimsdk/open-im-server/pull/3479)
* Update CHANGELOG for release v3.8.3-patch.1 [#3164](https://github.com/openimsdk/open-im-server/pull/3164)
* Update CHANGELOG for release v3.8.3-patch.2 [#3175](https://github.com/openimsdk/open-im-server/pull/3175)
* Update CHANGELOG for release v3.8.3-patch.3 [#3206](https://github.com/openimsdk/open-im-server/pull/3206)
* Update CHANGELOG for release v3.8.3-patch.4 [#3226](https://github.com/openimsdk/open-im-server/pull/3226)
* Update CHANGELOG for release v3.8.3-patch.5 [#3405](https://github.com/openimsdk/open-im-server/pull/3405)
* Update CHANGELOG for release v3.8.3-patch.6 [#3473](https://github.com/openimsdk/open-im-server/pull/3473)
* docs: update readme of config file. [#3356](https://github.com/openimsdk/open-im-server/pull/3356)
* Build: Implement rate limiting and circuit breaker for API and RPC services. [#3572](https://github.com/openimsdk/open-im-server/pull/3572)
* merge: pre-release-v3.8.4 [#3623](https://github.com/openimsdk/open-im-server/pull/3623)
* Simplify iOS background push gating (#3611) [#3612](https://github.com/openimsdk/open-im-server/pull/3612)
* bugfix(conversation):removed unexpectedly called functions and itself… [#3668](https://github.com/openimsdk/open-im-server/pull/3668)
* @lkzz made their first contribution in https://github.com/openimsdk/open-im-server/pull/2724
[#2724](https://github.com/openimsdk/open-im-server/pull/2724)
* @alilestera made their first contribution in https://github.com/openimsdk/open-im-server/pull/2773
[#2773](https://github.com/openimsdk/open-im-server/pull/2773)
* @kursataktas made their first contribution in https://github.com/openimsdk/open-im-server/pull/2788
[#2788](https://github.com/openimsdk/open-im-server/pull/2788)
* @yoyo930021 made their first contribution in https://github.com/openimsdk/open-im-server/pull/2844
[#2844](https://github.com/openimsdk/open-im-server/pull/2844)
* @wikylyu made their first contribution in https://github.com/openimsdk/open-im-server/pull/2861
[#2861](https://github.com/openimsdk/open-im-server/pull/2861)
* @storyn26383 made their first contribution in https://github.com/openimsdk/open-im-server/pull/2862
[#2862](https://github.com/openimsdk/open-im-server/pull/2862)
* @morya made their first contribution in https://github.com/openimsdk/open-im-server/pull/2881
[#2881](https://github.com/openimsdk/open-im-server/pull/2881)
**Full Changelog**: [v3.8.3-e-v1.1.5...v3.8.3-patch.1-e-v1.1.5](https://github.com/openimsdk/open-im-server-enterprise/compare/v3.8.3-e-v1.1.5...v3.8.3-patch.1-e-v1.1.5)
View File
+15 -12
View File
@@ -1,6 +1,6 @@
module github.com/openimsdk/open-im-server/v3
go 1.22.7
go 1.25.0
require (
firebase.google.com/go/v4 v4.14.1
@@ -12,11 +12,11 @@ require (
github.com/gorilla/websocket v1.5.1
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/mitchellh/mapstructure v1.5.0
github.com/openimsdk/protocol v0.0.73-alpha.17
github.com/openimsdk/tools v0.0.50-alpha.105
github.com/openimsdk/protocol v0.0.73-alpha.19
github.com/openimsdk/tools v0.0.50-alpha.113
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.18.0
github.com/stretchr/testify v1.10.0
github.com/stretchr/testify v1.11.1
go.mongodb.org/mongo-driver v1.14.0
google.golang.org/api v0.170.0
google.golang.org/grpc v1.71.0
@@ -35,7 +35,7 @@ require (
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/kelindar/bitmap v1.5.2
github.com/likexian/gokit v0.25.13
github.com/openimsdk/gomake v0.0.15-alpha.11
github.com/openimsdk/gomake v0.0.17
github.com/redis/go-redis/v9 v9.4.0
github.com/robfig/cron/v3 v3.0.1
github.com/shirou/gopsutil v3.21.11+incompatible
@@ -76,6 +76,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/sts v1.33.1 // indirect
github.com/aws/smithy-go v1.22.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bmatcuk/doublestar/v4 v4.10.0 // indirect
github.com/bytedance/sonic v1.11.6 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
@@ -90,6 +91,7 @@ require (
github.com/eapache/go-resiliency v1.6.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/ebitengine/purego v0.10.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
@@ -98,7 +100,7 @@ require (
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
@@ -108,7 +110,7 @@ require (
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
@@ -135,7 +137,7 @@ require (
github.com/leodido/go-urn v1.4.0 // indirect
github.com/lestrrat-go/strftime v1.0.6 // indirect
github.com/lithammer/shortuuid v3.0.0+incompatible // indirect
github.com/lufia/plan9stats v0.0.0-20230110061619-bbe2e5e100de // indirect
github.com/lufia/plan9stats v0.0.0-20260216142805-b3301c5f2a88 // indirect
github.com/magefile/mage v1.15.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
@@ -152,7 +154,7 @@ require (
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pierrec/lz4/v4 v4.1.21 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
@@ -163,6 +165,7 @@ require (
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sercand/kuberesolver/v6 v6.0.1 // indirect
github.com/shirou/gopsutil/v3 v3.24.5 // indirect
github.com/shirou/gopsutil/v4 v4.26.2 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
@@ -171,8 +174,8 @@ require (
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tencentyun/cos-go-sdk-v5 v0.7.47 // indirect
github.com/tklauser/go-sysconf v0.3.13 // indirect
github.com/tklauser/numcpus v0.7.0 // indirect
github.com/tklauser/go-sysconf v0.3.16 // indirect
github.com/tklauser/numcpus v0.11.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
@@ -196,7 +199,7 @@ require (
golang.org/x/image v0.15.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/oauth2 v0.25.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/term v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.5.0 // indirect
+28 -21
View File
@@ -61,6 +61,8 @@ github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLj
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bmatcuk/doublestar/v4 v4.10.0 h1:zU9WiOla1YA122oLM6i4EXvGW62DvKZVxIe6TYWexEs=
github.com/bmatcuk/doublestar/v4 v4.10.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
@@ -103,6 +105,8 @@ github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4A
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0=
github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
github.com/ebitengine/purego v0.10.0 h1:QIw4xfpWT6GWTzaW5XEKy3HXoqrJGx1ijYHzTF0/ISU=
github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
@@ -134,8 +138,9 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
@@ -202,8 +207,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
@@ -303,8 +308,8 @@ github.com/likexian/gokit v0.25.13 h1:p2Uw3+6fGG53CwdU2Dz0T6bOycdb2+bAFAa3ymwWVk
github.com/likexian/gokit v0.25.13/go.mod h1:qQhEWFBEfqLCO3/vOEo2EDKd+EycekVtUK4tex+l2H4=
github.com/lithammer/shortuuid v3.0.0+incompatible h1:NcD0xWW/MZYXEHa6ITy6kaXN5nwm/V115vj2YXfhS0w=
github.com/lithammer/shortuuid v3.0.0+incompatible/go.mod h1:FR74pbAuElzOUuenUHTK2Tciko1/vKuIKS9dSkDrA4w=
github.com/lufia/plan9stats v0.0.0-20230110061619-bbe2e5e100de h1:V53FWzU6KAZVi1tPp5UIsMoUWJ2/PNwYIDXnu7QuBCE=
github.com/lufia/plan9stats v0.0.0-20230110061619-bbe2e5e100de/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE=
github.com/lufia/plan9stats v0.0.0-20260216142805-b3301c5f2a88 h1:PTw+yKnXcOFCR6+8hHTyWBeQ/P4Nb7dd4/0ohEcWQuM=
github.com/lufia/plan9stats v0.0.0-20260216142805-b3301c5f2a88/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg=
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
@@ -347,12 +352,12 @@ github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA
github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
github.com/onsi/gomega v1.25.0 h1:Vw7br2PCDYijJHSfBOWhov+8cAnUf8MfMaIOV323l6Y=
github.com/onsi/gomega v1.25.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM=
github.com/openimsdk/gomake v0.0.15-alpha.11 h1:PQudYDRESYeYlUYrrLLJhYIlUPO5x7FAx+o5El9U/Bw=
github.com/openimsdk/gomake v0.0.15-alpha.11/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI=
github.com/openimsdk/protocol v0.0.73-alpha.17 h1:ddo0QMns1GVwAmrPIPlAQ7uKmThAYLnOt+CIOgLsJyE=
github.com/openimsdk/protocol v0.0.73-alpha.17/go.mod h1:WF7EuE55vQvpyUAzDXcqg+B+446xQyEba0X35lTINmw=
github.com/openimsdk/tools v0.0.50-alpha.105 h1:axuCvKXhxY2RGLhpMMFNgBtE0B65T2Sr1JDW3UD9nBs=
github.com/openimsdk/tools v0.0.50-alpha.105/go.mod h1:x9i/e+WJFW4tocy6RNJQ9NofQiP3KJ1Y576/06TqOG4=
github.com/openimsdk/gomake v0.0.17 h1:q8haP48VOH45WhJRiLj1YSBJyUFJqD8CTedH65i1YH8=
github.com/openimsdk/gomake v0.0.17/go.mod h1:nnjS8yCtrPJAt1knMbyPiUwCH2gpyBzj/EZAONfUOXg=
github.com/openimsdk/protocol v0.0.73-alpha.19 h1:CvXoDF2U73UcMhLnrtMFks2Aw+bXiDgH8AITEt783/s=
github.com/openimsdk/protocol v0.0.73-alpha.19/go.mod h1:WF7EuE55vQvpyUAzDXcqg+B+446xQyEba0X35lTINmw=
github.com/openimsdk/tools v0.0.50-alpha.113 h1:rhLWaSJuhjgJFNVzmpChLCG7dPXS0+bte+CPI0008Us=
github.com/openimsdk/tools v0.0.50-alpha.113/go.mod h1:x9i/e+WJFW4tocy6RNJQ9NofQiP3KJ1Y576/06TqOG4=
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ=
@@ -363,8 +368,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b h1:0LFwY6Q3gMACTjAbMZBjXAqTOzOwFaj2Ld6cjeQ7Rig=
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk=
@@ -403,6 +408,8 @@ github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKl
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI=
github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk=
github.com/shirou/gopsutil/v4 v4.26.2 h1:X8i6sicvUFih4BmYIGT1m2wwgw2VG9YgrDTi7cIRGUI=
github.com/shirou/gopsutil/v4 v4.26.2/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ=
github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=
github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ=
github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU=
@@ -433,18 +440,18 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.563/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563/go.mod h1:uom4Nvi9W+Qkom0exYiJ9VWJjXwyxtPYTkKkaLMlfE0=
github.com/tencentyun/cos-go-sdk-v5 v0.7.47 h1:uoS4Sob16qEYoapkqJq1D1Vnsy9ira9BfNUMtoFYTI4=
github.com/tencentyun/cos-go-sdk-v5 v0.7.47/go.mod h1:DH9US8nB+AJXqwu/AMOrCFN1COv3dpytXuJWHgdg7kE=
github.com/tklauser/go-sysconf v0.3.13 h1:GBUpcahXSpR2xN01jhkNAbTLRk2Yzgggk8IM08lq3r4=
github.com/tklauser/go-sysconf v0.3.13/go.mod h1:zwleP4Q4OehZHGn4CYZDipCgg9usW5IJePewFCGVEa0=
github.com/tklauser/numcpus v0.7.0 h1:yjuerZP127QG9m5Zh/mSO4wqurYil27tHrqwRoRjpr4=
github.com/tklauser/numcpus v0.7.0/go.mod h1:bb6dMVcj8A42tSE7i32fsIUCbQNllK5iDguyOZRUzAY=
github.com/tklauser/go-sysconf v0.3.16 h1:frioLaCQSsF5Cy1jgRBrzr6t502KIIwQ0MArYICU0nA=
github.com/tklauser/go-sysconf v0.3.16/go.mod h1:/qNL9xxDhc7tx3HSRsLWNnuzbVfh3e7gh/BmM179nYI=
github.com/tklauser/numcpus v0.11.0 h1:nSTwhKH5e1dMNsCdVBukSZrURJRoHbSEQjdEbY+9RXw=
github.com/tklauser/numcpus v0.11.0/go.mod h1:z+LwcLq54uWZTX0u/bGobaV34u6V7KNlTZejzM6/3MQ=
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
@@ -567,8 +574,8 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=
golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+9 -12
View File
@@ -152,19 +152,16 @@ func (s *Server) pushToUser(ctx context.Context, userID string, msgData *sdkws.M
userPlatform := &msggateway.SingleMsgToUserPlatform{
RecvPlatFormID: int32(client.PlatformID),
}
if !client.IsBackground ||
(client.IsBackground && client.PlatformID != constant.IOSPlatformID) {
err := client.PushMessage(ctx, msgData)
if err != nil {
log.ZWarn(ctx, "online push msg failed", err, "userID", userID, "platformID", client.PlatformID)
userPlatform.ResultCode = int64(servererrs.ErrPushMsgErr.Code())
} else {
if _, ok := s.pushTerminal[client.PlatformID]; ok {
result.OnlinePush = true
}
}
} else {
if client.IsBackground && client.PlatformID == constant.IOSPlatformID {
userPlatform.ResultCode = int64(servererrs.ErrIOSBackgroundPushErr.Code())
result.Resp = append(result.Resp, userPlatform)
continue
}
if err := client.PushMessage(ctx, msgData); err != nil {
log.ZWarn(ctx, "online push msg failed", err, "userID", userID, "platformID", client.PlatformID)
userPlatform.ResultCode = int64(servererrs.ErrPushMsgErr.Code())
} else if _, ok := s.pushTerminal[client.PlatformID]; ok {
result.OnlinePush = true
}
result.Resp = append(result.Resp, userPlatform)
}
-58
View File
@@ -513,14 +513,6 @@ func (c *conversationServer) GetUserConversationIDsHash(ctx context.Context, req
return &pbconversation.GetUserConversationIDsHashResp{Hash: hash}, nil
}
func (c *conversationServer) GetConversationsByConversationID(ctx context.Context, req *pbconversation.GetConversationsByConversationIDReq) (*pbconversation.GetConversationsByConversationIDResp, error) {
conversations, err := c.conversationDatabase.GetConversationsByConversationID(ctx, req.ConversationIDs)
if err != nil {
return nil, err
}
return &pbconversation.GetConversationsByConversationIDResp{Conversations: convert.ConversationsDB2Pb(conversations)}, nil
}
func (c *conversationServer) GetConversationOfflinePushUserIDs(ctx context.Context, req *pbconversation.GetConversationOfflinePushUserIDsReq) (*pbconversation.GetConversationOfflinePushUserIDsResp, error) {
if req.ConversationID == "" {
return nil, errs.ErrArgs.WrapMsg("conversationID is empty")
@@ -717,56 +709,6 @@ func (c *conversationServer) GetOwnerConversation(ctx context.Context, req *pbco
}, nil
}
func (c *conversationServer) GetConversationsNeedClearMsg(ctx context.Context, _ *pbconversation.GetConversationsNeedClearMsgReq) (*pbconversation.GetConversationsNeedClearMsgResp, error) {
num, err := c.conversationDatabase.GetAllConversationIDsNumber(ctx)
if err != nil {
log.ZError(ctx, "GetAllConversationIDsNumber failed", err)
return nil, err
}
const batchNum = 100
if num == 0 {
return nil, errs.New("Need Destruct Msg is nil").Wrap()
}
maxPage := (num + batchNum - 1) / batchNum
temp := make([]*dbModel.Conversation, 0, maxPage*batchNum)
for pageNumber := 0; pageNumber < int(maxPage); pageNumber++ {
pagination := &sdkws.RequestPagination{
PageNumber: int32(pageNumber),
ShowNumber: batchNum,
}
conversationIDs, err := c.conversationDatabase.PageConversationIDs(ctx, pagination)
if err != nil {
log.ZError(ctx, "PageConversationIDs failed", err, "pageNumber", pageNumber)
continue
}
// log.ZDebug(ctx, "PageConversationIDs success", "pageNumber", pageNumber, "conversationIDsNum", len(conversationIDs), "conversationIDs", conversationIDs)
if len(conversationIDs) == 0 {
continue
}
conversations, err := c.conversationDatabase.GetConversationsByConversationID(ctx, conversationIDs)
if err != nil {
log.ZError(ctx, "GetConversationsByConversationID failed", err, "conversationIDs", conversationIDs)
continue
}
for _, conversation := range conversations {
if conversation.IsMsgDestruct && conversation.MsgDestructTime != 0 && ((time.Now().UnixMilli() > (conversation.MsgDestructTime + conversation.LatestMsgDestructTime.UnixMilli() + 8*60*60)) || // 8*60*60 is UTC+8
conversation.LatestMsgDestructTime.IsZero()) {
temp = append(temp, conversation)
}
}
}
return &pbconversation.GetConversationsNeedClearMsgResp{Conversations: convert.ConversationsDB2Pb(temp)}, nil
}
func (c *conversationServer) GetNotNotifyConversationIDs(ctx context.Context, req *pbconversation.GetNotNotifyConversationIDsReq) (*pbconversation.GetNotNotifyConversationIDsResp, error) {
if err := authverify.CheckAccess(ctx, req.UserID); err != nil {
return nil, err
+19 -5
View File
@@ -472,6 +472,9 @@ func (g *groupServer) InviteUserToGroup(ctx context.Context, req *pbgroup.Invite
g.notification.GroupApplicationAgreeMemberEnterNotification(ctx, req.GroupID, req.SendMessage, opUserID, userIDs...)
}
}
if err := g.setMemberJoinSeq(ctx, req.GroupID, req.InvitedUserIDs); err != nil {
return nil, err
}
return &pbgroup.InviteUserToGroupResp{}, nil
}
@@ -602,10 +605,6 @@ func (g *groupServer) KickGroupMember(ctx context.Context, req *pbgroup.KickGrou
}
}
}
num, err := g.db.FindGroupMemberNum(ctx, req.GroupID)
if err != nil {
return nil, err
}
ownerUserIDs, err := g.db.GetGroupRoleLevelMemberIDs(ctx, req.GroupID, constant.GroupOwner)
if err != nil {
return nil, err
@@ -617,6 +616,10 @@ func (g *groupServer) KickGroupMember(ctx context.Context, req *pbgroup.KickGrou
if err := g.db.DeleteGroupMember(ctx, group.GroupID, req.KickedUserIDs); err != nil {
return nil, err
}
num, err := g.db.FindGroupMemberNum(ctx, req.GroupID)
if err != nil {
return nil, err
}
tips := &sdkws.MemberKickedTips{
Group: &sdkws.GroupInfo{
GroupID: group.GroupID,
@@ -626,7 +629,7 @@ func (g *groupServer) KickGroupMember(ctx context.Context, req *pbgroup.KickGrou
FaceURL: group.FaceURL,
OwnerUserID: ownerUserID,
CreateTime: group.CreateTime.UnixMilli(),
MemberCount: num - uint32(len(req.KickedUserIDs)),
MemberCount: num,
Ex: group.Ex,
Status: group.Status,
CreatorUserID: group.CreatorUserID,
@@ -905,6 +908,9 @@ func (g *groupServer) GroupApplicationResponse(ctx context.Context, req *pbgroup
return nil, err
}
}
if err := g.setMemberJoinSeq(ctx, req.GroupID, []string{req.FromUserID}); err != nil {
return nil, err
}
}
case constant.GroupResponseRefuse:
g.notification.GroupApplicationRejectedNotification(ctx, req)
@@ -967,6 +973,9 @@ func (g *groupServer) JoinGroup(ctx context.Context, req *pbgroup.JoinGroupReq)
if err = g.notification.MemberEnterNotification(ctx, req.GroupID, req.InviterUserID); err != nil {
return nil, err
}
if err := g.setMemberJoinSeq(ctx, req.GroupID, []string{req.InviterUserID}); err != nil {
return nil, err
}
g.webhookAfterJoinGroup(ctx, &g.config.WebhooksConfig.AfterJoinGroup, req)
return &pbgroup.JoinGroupResp{}, nil
@@ -1028,6 +1037,11 @@ func (g *groupServer) deleteMemberAndSetConversationSeq(ctx context.Context, gro
return g.conversationClient.SetConversationMaxSeq(ctx, conversationID, userIDs, maxSeq)
}
func (g *groupServer) setMemberJoinSeq(ctx context.Context, groupID string, userIDs []string) error {
conversationID := msgprocessor.GetConversationIDBySessionType(constant.ReadGroupChatType, groupID)
return g.conversationClient.SetConversationMaxSeq(ctx, conversationID, userIDs, 0)
}
func (g *groupServer) SetGroupInfo(ctx context.Context, req *pbgroup.SetGroupInfoReq) (*pbgroup.SetGroupInfoResp, error) {
var opMember *model.GroupMember
if !authverify.IsAdmin(ctx) {
+3 -6
View File
@@ -19,7 +19,6 @@ import (
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/protocol/constant"
"github.com/openimsdk/protocol/conversation"
"github.com/openimsdk/protocol/msg"
"github.com/openimsdk/protocol/sdkws"
"github.com/openimsdk/tools/log"
@@ -74,7 +73,7 @@ func (m *msgServer) DeleteMsgs(ctx context.Context, req *msg.DeleteMsgsReq) (*ms
if err := m.MsgDatabase.DeleteMsgsPhysicalBySeqs(ctx, req.ConversationID, req.Seqs); err != nil {
return nil, err
}
conv, err := m.conversationClient.GetConversationsByConversationID(ctx, req.ConversationID)
conv, err := m.conversationClient.GetConversation(ctx, req.ConversationID, req.UserID)
if err != nil {
return nil, err
}
@@ -116,14 +115,12 @@ func (m *msgServer) DeleteMsgPhysical(ctx context.Context, req *msg.DeleteMsgPhy
}
func (m *msgServer) clearConversation(ctx context.Context, conversationIDs []string, userID string, deleteSyncOpt *msg.DeleteSyncOpt) error {
conversations, err := m.conversationClient.GetConversationsByConversationIDs(ctx, conversationIDs)
conversations, err := m.conversationClient.GetConversations(ctx, conversationIDs, userID)
if err != nil {
return err
}
var existConversations []*conversation.Conversation
var existConversationIDs []string
for _, conversation := range conversations {
existConversations = append(existConversations, conversation)
existConversationIDs = append(existConversationIDs, conversation.ConversationID)
}
log.ZDebug(ctx, "ClearConversationsMsg", "existConversationIDs", existConversationIDs)
@@ -152,7 +149,7 @@ func (m *msgServer) clearConversation(ctx context.Context, conversationIDs []str
if err := m.MsgDatabase.SetMinSeqs(ctx, m.getMinSeqs(maxSeqs)); err != nil {
return err
}
for _, conversation := range existConversations {
for _, conversation := range conversations {
tips := &sdkws.ClearConversationTips{UserID: userID, ConversationIDs: []string{conversation.ConversationID}}
m.notificationSender.NotificationWithSessionType(ctx, userID, m.conversationAndGetRecvID(conversation, userID), constant.ClearConversationNotification, conversation.ConversationType, tips)
}
+42 -8
View File
@@ -5,9 +5,12 @@ package main
import (
"flag"
"fmt"
"os"
"github.com/openimsdk/gomake/mageutil"
"github.com/openimsdk/open-im-server/v3/version"
"github.com/openimsdk/tools/utils/datautil"
)
var Default = Build
@@ -25,7 +28,6 @@ var (
customToolsDir = "tools" // tools source code directory, default is "tools"
)
// Build support specifical binary build.
//
// Example: `mage build openim-api openim-rpc-user seq`
@@ -35,8 +37,7 @@ func Build() {
if len(bin) != 0 {
bin = bin[1:]
}
mageutil.Build(bin, nil)
mageutil.WithSpinner("Building binaries...", func() { mageutil.Build(bin, nil, nil) })
}
func BuildWithCustomConfig() {
@@ -53,7 +54,9 @@ func BuildWithCustomConfig() {
ToolsDir: &customToolsDir,
}
mageutil.Build(bin, config)
mageutil.WithSpinner("Building binaries with custom config...", func() {
mageutil.Build(bin, config, nil)
})
}
func Start() {
@@ -70,7 +73,9 @@ func Start() {
bin = bin[1:]
}
mageutil.StartToolsAndServices(bin, nil)
mageutil.WithSpinner("Starting...", func() {
mageutil.StartToolsAndServices(bin, nil)
})
}
func StartWithCustomConfig() {
@@ -93,13 +98,42 @@ func StartWithCustomConfig() {
ConfigDir: &customConfigDir,
}
mageutil.StartToolsAndServices(bin, config)
mageutil.WithSpinner("Starting with custom config...", func() {
mageutil.StartToolsAndServices(bin, config)
})
}
func Stop() {
mageutil.StopAndCheckBinaries()
mageutil.WithSpinner("Stopping...", mageutil.StopAndCheckBinaries)
}
func Check() {
mageutil.CheckAndReportBinariesStatus()
mageutil.WithSpinner("Checking binaries...", mageutil.CheckAndReportBinariesStatus)
}
func Export() {
mappingPaths, err := mageutil.GetDefaultExportMappingPaths([]string{
"cmd",
"internal",
"pkg",
"test",
"tools",
"**/*.go",
"go.mod",
"go.work",
})
if err != nil {
mageutil.PrintRed("GetDefaultExportMappingPaths failed " + err.Error())
os.Exit(1)
}
mageutil.WithSpinner("Exporting...", func() {
mageutil.ExportMageLauncherArchived(mappingPaths, &mageutil.ExportOptions{
ProjectName: datautil.ToPtr(fmt.Sprintf("open-im-server_%s", version.Version)),
BuildOpt: &mageutil.BuildOptions{
Release: datautil.ToPtr(true),
Compress: datautil.ToPtr(true),
},
})
})
}
+1
View File
@@ -70,6 +70,7 @@ const (
BlockedByPeer = 1302 // Blocked by the peer
NotPeersFriend = 1303 // Not the peer's friend
RelationshipAlreadyError = 1304 // Already in a friend relationship
FriendRequestHandled = 1305 // Friend request has already been handled
// Message error codes.
MessageHasReadDisable = 1401
+5 -4
View File
@@ -51,10 +51,11 @@ var (
ErrMessageHasReadDisable = errs.NewCodeError(MessageHasReadDisable, "MessageHasReadDisable")
ErrCanNotAddYourself = errs.NewCodeError(CanNotAddYourselfError, "CanNotAddYourselfError")
ErrBlockedByPeer = errs.NewCodeError(BlockedByPeer, "BlockedByPeer")
ErrNotPeersFriend = errs.NewCodeError(NotPeersFriend, "NotPeersFriend")
ErrRelationshipAlready = errs.NewCodeError(RelationshipAlreadyError, "RelationshipAlreadyError")
ErrCanNotAddYourself = errs.NewCodeError(CanNotAddYourselfError, "CanNotAddYourselfError")
ErrBlockedByPeer = errs.NewCodeError(BlockedByPeer, "BlockedByPeer")
ErrNotPeersFriend = errs.NewCodeError(NotPeersFriend, "NotPeersFriend")
ErrRelationshipAlready = errs.NewCodeError(RelationshipAlreadyError, "RelationshipAlreadyError")
ErrFriendRequestHandled = errs.NewCodeError(FriendRequestHandled, "FriendRequestHandled")
ErrMutedInGroup = errs.NewCodeError(MutedInGroup, "MutedInGroup")
ErrMutedGroup = errs.NewCodeError(MutedGroup, "MutedGroup")
@@ -61,8 +61,6 @@ type ConversationDatabase interface {
GetAllConversationIDsNumber(ctx context.Context) (int64, error)
// PageConversationIDs paginates through conversation IDs based on the specified pagination settings.
PageConversationIDs(ctx context.Context, pagination pagination.Pagination) (conversationIDs []string, err error)
// GetConversationsByConversationID retrieves conversations by their IDs.
GetConversationsByConversationID(ctx context.Context, conversationIDs []string) ([]*relationtb.Conversation, error)
// GetConversationIDsNeedDestruct fetches conversations that need to be destructed based on specific criteria.
GetConversationIDsNeedDestruct(ctx context.Context) ([]*relationtb.Conversation, error)
// GetConversationNotReceiveMessageUserIDs gets user IDs for users in a conversation who have not received messages.
@@ -375,10 +373,6 @@ func (c *conversationDatabase) PageConversationIDs(ctx context.Context, paginati
return c.conversationDB.PageConversationIDs(ctx, pagination)
}
func (c *conversationDatabase) GetConversationsByConversationID(ctx context.Context, conversationIDs []string) ([]*relationtb.Conversation, error) {
return c.conversationDB.GetConversationsByConversationID(ctx, conversationIDs)
}
func (c *conversationDatabase) GetConversationIDsNeedDestruct(ctx context.Context) ([]*relationtb.Conversation, error) {
return c.conversationDB.GetConversationIDsNeedDestruct(ctx)
}
+8 -10
View File
@@ -16,9 +16,9 @@ package controller
import (
"context"
"fmt"
"time"
"github.com/openimsdk/open-im-server/v3/pkg/common/servererrs"
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/database"
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/database/mgo"
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/model"
@@ -109,15 +109,13 @@ func (f *friendDatabase) CheckIn(ctx context.Context, userID1, userID2 string) (
// Retrieve friend IDs of userID1 from the cache
userID1FriendIDs, err := f.cache.GetFriendIDs(ctx, userID1)
if err != nil {
err = fmt.Errorf("error retrieving friend IDs for user %s: %w", userID1, err)
return
return false, false, err
}
// Retrieve friend IDs of userID2 from the cache
userID2FriendIDs, err := f.cache.GetFriendIDs(ctx, userID2)
if err != nil {
err = fmt.Errorf("error retrieving friend IDs for user %s: %w", userID2, err)
return
return false, false, err
}
// Check if userID2 is in userID1's friend list and vice versa
@@ -214,12 +212,12 @@ func (f *friendDatabase) RefuseFriendRequest(ctx context.Context, friendRequest
// Attempt to retrieve the friend request from the database.
fr, err := f.friendRequest.Take(ctx, friendRequest.FromUserID, friendRequest.ToUserID)
if err != nil {
return fmt.Errorf("failed to retrieve friend request from %s to %s: %w", friendRequest.FromUserID, friendRequest.ToUserID, err)
return err
}
// Check if the friend request has already been handled.
if fr.HandleResult != 0 {
return fmt.Errorf("friend request from %s to %s has already been processed", friendRequest.FromUserID, friendRequest.ToUserID)
return servererrs.ErrFriendRequestHandled.WrapMsg("friend request has already been processed", "from", friendRequest.FromUserID, "to", friendRequest.ToUserID)
}
// Log the action of refusing the friend request for debugging and auditing purposes.
@@ -232,7 +230,7 @@ func (f *friendDatabase) RefuseFriendRequest(ctx context.Context, friendRequest
friendRequest.HandleResult = constant.FriendResponseRefuse
friendRequest.HandleTime = time.Now()
if err := f.friendRequest.Update(ctx, friendRequest); err != nil {
return fmt.Errorf("failed to update friend request from %s to %s as refused: %w", friendRequest.FromUserID, friendRequest.ToUserID, err)
return err
}
return nil
@@ -350,9 +348,9 @@ func (f *friendDatabase) PageFriendRequestToMe(ctx context.Context, userID strin
func (f *friendDatabase) FindFriendsWithError(ctx context.Context, ownerUserID string, friendUserIDs []string) (friends []*model.Friend, err error) {
friends, err = f.friend.FindFriends(ctx, ownerUserID, friendUserIDs)
if err != nil {
return
return nil, err
}
return
return friends, nil
}
func (f *friendDatabase) FindFriendUserIDs(ctx context.Context, ownerUserID string) (friendUserIDs []string, err error) {
@@ -39,7 +39,6 @@ type Conversation interface {
GetAllConversationIDs(ctx context.Context) ([]string, error)
GetAllConversationIDsNumber(ctx context.Context) (int64, error)
PageConversationIDs(ctx context.Context, pagination pagination.Pagination) (conversationIDs []string, err error)
GetConversationsByConversationID(ctx context.Context, conversationIDs []string) ([]*model.Conversation, error)
GetConversationIDsNeedDestruct(ctx context.Context) ([]*model.Conversation, error)
GetConversationNotReceiveMessageUserIDs(ctx context.Context, conversationID string) ([]string, error)
FindConversationUserVersion(ctx context.Context, userID string, version uint, limit int) (*model.VersionLog, error)
@@ -47,6 +47,12 @@ func NewConversationMongo(db *mongo.Database) (*ConversationMgo, error) {
},
Options: options.Index(),
},
{
Keys: bson.D{
{Key: "conversation_id", Value: 1},
},
Options: options.Index().SetUnique(true),
},
})
if err != nil {
return nil, errs.Wrap(err)
@@ -232,10 +238,6 @@ func (c *ConversationMgo) PageConversationIDs(ctx context.Context, pagination pa
return mongoutil.FindPageOnly[string](ctx, c.coll, bson.M{}, pagination, options.Find().SetProjection(bson.M{"conversation_id": 1}))
}
func (c *ConversationMgo) GetConversationsByConversationID(ctx context.Context, conversationIDs []string) ([]*model.Conversation, error) {
return mongoutil.Find[*model.Conversation](ctx, c.coll, bson.M{"conversation_id": bson.M{"$in": conversationIDs}})
}
func (c *ConversationMgo) GetConversationIDsNeedDestruct(ctx context.Context) ([]*model.Conversation, error) {
// "is_msg_destruct = 1 && msg_destruct_time != 0 && (UNIX_TIMESTAMP(NOW()) > (msg_destruct_time + UNIX_TIMESTAMP(latest_msg_destruct_time)) || latest_msg_destruct_time is NULL)"
return mongoutil.Find[*model.Conversation](ctx, c.coll, bson.M{
+3 -2
View File
@@ -15,10 +15,11 @@
package localcache
import (
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/cache/cachekey"
"strings"
"sync"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/cache/cachekey"
)
var (
+1 -12
View File
@@ -2,6 +2,7 @@ package rpcli
import (
"context"
"github.com/openimsdk/protocol/conversation"
"google.golang.org/grpc"
)
@@ -30,18 +31,6 @@ func (x *ConversationClient) SetConversations(ctx context.Context, ownerUserIDs
return ignoreResp(x.ConversationClient.SetConversations(ctx, req))
}
func (x *ConversationClient) GetConversationsByConversationIDs(ctx context.Context, conversationIDs []string) ([]*conversation.Conversation, error) {
if len(conversationIDs) == 0 {
return nil, nil
}
req := &conversation.GetConversationsByConversationIDReq{ConversationIDs: conversationIDs}
return extractField(ctx, x.ConversationClient.GetConversationsByConversationID, req, (*conversation.GetConversationsByConversationIDResp).GetConversations)
}
func (x *ConversationClient) GetConversationsByConversationID(ctx context.Context, conversationID string) (*conversation.Conversation, error) {
return firstValue(x.GetConversationsByConversationIDs(ctx, []string{conversationID}))
}
func (x *ConversationClient) SetConversationMinSeq(ctx context.Context, conversationID string, ownerUserIDs []string, minSeq int64) error {
if len(ownerUserIDs) == 0 {
return nil
+1 -1
View File
@@ -1 +1 @@
v3.9.0
main