mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
fix bug: add friend need update both request
This commit is contained in:
parent
4c365701d4
commit
643de8c7ec
@ -291,8 +291,9 @@ const (
|
||||
GroupResponseAgree = 1
|
||||
GroupResponseRefuse = -1
|
||||
|
||||
FriendResponseAgree = 1
|
||||
FriendResponseRefuse = -1
|
||||
FriendResponseNotHandle = 0
|
||||
FriendResponseAgree = 1
|
||||
FriendResponseRefuse = -1
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user