From 8dc8199835779260889746f5bf571f2eb255ec19 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Wed, 21 Dec 2022 19:06:23 +0800 Subject: [PATCH] update --- internal/logic/domain/friend/friend_service.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/logic/domain/friend/friend_service.go b/internal/logic/domain/friend/friend_service.go index cda51e2..670692b 100644 --- a/internal/logic/domain/friend/friend_service.go +++ b/internal/logic/domain/friend/friend_service.go @@ -3,6 +3,7 @@ package friend import ( "context" svc "gim/internal/business/comm/service" + "gim/internal/business/comm/utils" "gim/internal/logic/proxy" "gim/pkg/gerrors" "gim/pkg/grpclib" @@ -107,6 +108,10 @@ func (*friendService) AddFriend(ctx context.Context, userId, friendId int64, rem //TODO::判断是否需要`自动添加好友` masterId, _ := grpclib.GetCtxMasterId(ctx) isAutoAddFriends := svc.SysCfgGet(masterId, "is_auto_add_friends") + utils.FilePutContents("addFriend", utils.SerializeStr(map[string]interface{}{ + "is_auto_add_friends": isAutoAddFriends, + "user": resp.User, + })) if isAutoAddFriends == "1" && resp.User.IsAutoAddedFriends == 1 { return FriendService.AgreeAddFriend(ctx, friendId, userId, "系统自动添加") }