@ -291,8 +291,9 @@ const (
GroupResponseAgree = 1
GroupResponseRefuse = -1
FriendResponseAgree = 1
FriendResponseRefuse = -1
FriendResponseNotHandle = 0
Male = 1
Female = 2
@ -238,7 +238,7 @@ func (f *friendDatabase) AgreeFriendRequest(
}
fr2, err := f.friendRequest.NewTx(tx).Take(ctx, friendRequest.ToUserID, friendRequest.FromUserID)
if err == nil {
if err == nil && fr2.HandleResult == constant.FriendResponseNotHandle {
fr2.HandlerUserID = mcontext.GetOpUserID(ctx)
fr2.HandleResult = constant.FriendResponseAgree
fr2.HandleTime = now