|
@@ -173,16 +173,17 @@ func (*friendService) AgreeAddFriend(ctx context.Context, userId, friendId int64 |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
resp, err := rpc.GetBusinessIntClient().GetUser(ctx, &pb.GetUserReq{UserId: userId}) |
|
|
|
|
|
|
|
|
resp, err := rpc.GetBusinessIntClient().GetUser(ctx, &pb.GetUserReq{UserId: friendId}) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
err = proxy.MessageProxy.PushToUser(ctx, friendId, pb.PushCode_PC_AGREE_ADD_FRIEND, &pb.AgreeAddFriendPush{ |
|
|
err = proxy.MessageProxy.PushToUser(ctx, friendId, pb.PushCode_PC_AGREE_ADD_FRIEND, &pb.AgreeAddFriendPush{ |
|
|
FriendId: userId, |
|
|
|
|
|
|
|
|
FriendId: friendId, |
|
|
Nickname: resp.User.Nickname, |
|
|
Nickname: resp.User.Nickname, |
|
|
AvatarUrl: resp.User.AvatarUrl, |
|
|
AvatarUrl: resp.User.AvatarUrl, |
|
|
}, true) |
|
|
}, true) |
|
|
|
|
|
|
|
|
utils.FilePutContents("push_AgreeAddFriend", utils.SerializeStr(map[string]interface{}{ |
|
|
utils.FilePutContents("push_AgreeAddFriend", utils.SerializeStr(map[string]interface{}{ |
|
|
"friend_id": userId, |
|
|
"friend_id": userId, |
|
|
"friend_nick_name": resp.User.Nickname, |
|
|
"friend_nick_name": resp.User.Nickname, |
|
|