fix: reject friend request to missing user

This commit is contained in:
richjohnrambo
2026-09-15 00:48:36 +08:00
parent 15abc1b6e8
commit ef8091d805
2 changed files with 37 additions and 0 deletions
+3
View File
@@ -3436,6 +3436,9 @@ func relationshipContext(tenantAdp adapter.TenantBusinessAdapter, tenantID types
if err != nil {
return nil, err
}
if peer == nil {
return nil, types.ErrNotFound
}
ctx.Peer = peer
if cachedBlock, err := cachedBlockContains(tenantID, userID, peerID); err != nil {
logs.Warn.Printf("cache block[%s:%s]: read failed: %v", userID.UserId(), peerID.UserId(), err)