Skip to content

Commit

Permalink
new feat: sync less data
Browse files Browse the repository at this point in the history
  • Loading branch information
wangchuxiao-dev committed Jul 26, 2023
1 parent 1f4b474 commit 7acc584
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/friend/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

func (f *Friend) SyncBothFriendRequest(ctx context.Context, fromUserID, toUserID string) error {
var resp friend.GetDesignatedFriendsApplyResp
if err := util.ApiPost(ctx, constant.GetDesignatedFriendsApply, &friend.GetDesignatedFriendsApplyReq{FromUserID: fromUserID, ToUserID: toUserID}, &resp); err != nil {
if err := util.ApiPost(ctx, constant.GetDesignatedFriendsApplyRouter, &friend.GetDesignatedFriendsApplyReq{FromUserID: fromUserID, ToUserID: toUserID}, &resp); err != nil {
return nil
}
localData, err := f.db.GetBothFriendReq(ctx, fromUserID, toUserID)
Expand Down
2 changes: 1 addition & 1 deletion internal/group/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (g *Group) doNotification(ctx context.Context, msg *sdkws.MsgData) error {
if err := g.db.DeleteGroupAllMembers(ctx, detail.Group.GroupID); err != nil {
return err
}
if err := g.SyncGroups(ctx, detail.Group.GroupID); err != nil {
if err := g.db.DeleteGroup(ctx, detail.Group.GroupID); err != nil {
return err
}
return g.SyncAllGroupMember(ctx, detail.Group.GroupID)
Expand Down
10 changes: 5 additions & 5 deletions pkg/constant/server_api_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ const (
GetFriendApplicationListRouter = "/friend/get_friend_apply_list" //recv
GetSelfFriendApplicationListRouter = "/friend/get_self_friend_apply_list" //send

GetDesignatedFriendsApply = "/friend/get_designated_friend_apply"
GetFriendListRouter = "/friend/get_friend_list"
GetDesignatedFriendsRouter = "friend/get_designated_friends"
AddFriendResponse = "/friend/add_friend_response"
SetFriendRemark = "/friend/set_friend_remark"
GetDesignatedFriendsApplyRouter = "/friend/get_designated_friend_apply"
GetFriendListRouter = "/friend/get_friend_list"
GetDesignatedFriendsRouter = "/friend/get_designated_friends"
AddFriendResponse = "/friend/add_friend_response"
SetFriendRemark = "/friend/set_friend_remark"

AddBlackRouter = "/friend/add_black"
RemoveBlackRouter = "/friend/remove_black"
Expand Down
2 changes: 1 addition & 1 deletion test/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

var LogLevel uint32 = 6
var PlatformID = int32(3)
var PlatformID = int32(1)
var LogName = ""
var IsLogStandardOutput = true
var LogFilePath = ""
Expand Down

0 comments on commit 7acc584

Please sign in to comment.