Fix client friend status mapping
- Add explicit client friend status constants and resolver - Return dynamic friend status from profileInfo and friend/search - Accept invite_code when loading profileInfo targets - Align live support friend status values with client expectations Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
@@ -86,6 +86,11 @@ func search(ctx *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
friendStatus, err := usermodel.ResolveClientFriendStatus(ss.UserEng, ss.UserID, targetUserID)
|
||||
if ss.CheckErr(err) {
|
||||
return
|
||||
}
|
||||
|
||||
ss.Respond(friendschema.SearchResp{
|
||||
ResponseData: friendschema.SearchData{
|
||||
UserInfo: friendschema.SearchUserInfo{
|
||||
@@ -103,7 +108,7 @@ func search(ctx *gin.Context) {
|
||||
CenterUnitInfo: toSearchCenterUnitInfo(centerUnitInfo, costume),
|
||||
SettingAwardID: row.AwardID,
|
||||
IsAlliance: false,
|
||||
FriendStatus: 0,
|
||||
FriendStatus: friendStatus,
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
|
||||
Reference in New Issue
Block a user