fix: import del cache (#2492)

This commit is contained in:
icey-yu 2024-08-08 15:20:01 +08:00 committed by GitHub
parent 56e6da12c3
commit 9b32c630dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -192,6 +192,7 @@ func (f *friendDatabase) BecomeFriends(ctx context.Context, ownerUserID string,
if err != nil { if err != nil {
return err return err
} }
cache = cache.DelFriendIDs(ownerUserID).DelMaxFriendVersion(ownerUserID)
if len(newMyFriendIDs) > 0 { if len(newMyFriendIDs) > 0 {
cache = cache.DelFriendIDs(newMyFriendIDs...) cache = cache.DelFriendIDs(newMyFriendIDs...)
cache = cache.DelFriends(ownerUserID, newMyFriendIDs).DelMaxFriendVersion(newMyFriendIDs...) cache = cache.DelFriends(ownerUserID, newMyFriendIDs).DelMaxFriendVersion(newMyFriendIDs...)