Merge pull request #3334 from openimsdk/cherry-pick-52bd5e8

fix: transferring the group owner to a muted member, incremental version error [Created by @withchao from #3284]
This commit is contained in:
chao 2025-05-14 16:31:50 +08:00 committed by GitHub
commit a3ff727843
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -283,7 +283,8 @@ func (g *NotificationSender) fillOpUserByUserID(ctx context.Context, userID stri
func (g *NotificationSender) setVersion(ctx context.Context, version *uint64, versionID *string, collName string, id string) {
versions := versionctx.GetVersionLog(ctx).Get()
for _, coll := range versions {
for i := len(versions) - 1; i >= 0; i-- {
coll := versions[i]
if coll.Name == collName && coll.Doc.DID == id {
*version = uint64(coll.Doc.Version)
*versionID = coll.Doc.ID.Hex()