1
This commit is contained in:
parent
1a63fe4a4a
commit
7acea617ca
@ -373,7 +373,7 @@ func (this *friendMgr) AsyncRemoveBlack(senderId string, targetId string, cb fun
|
||||
func (this *friendMgr) addFriendShip(accountId1 string, accountId2 string, addTime int32) {
|
||||
{
|
||||
friends := this.getFriends(accountId1)
|
||||
if friends != nil {
|
||||
if friends == nil {
|
||||
this.friendHash[accountId1] = make(map[string]int32)
|
||||
friends = this.getFriends(accountId1)
|
||||
}
|
||||
@ -381,7 +381,7 @@ func (this *friendMgr) addFriendShip(accountId1 string, accountId2 string, addTi
|
||||
}
|
||||
{
|
||||
friends := this.getFriends(accountId2)
|
||||
if friends != nil {
|
||||
if friends == nil {
|
||||
this.friendHash[accountId2] = make(map[string]int32)
|
||||
friends = this.getFriends(accountId2)
|
||||
}
|
||||
@ -407,7 +407,7 @@ func (this *friendMgr) removeFriendShip(accountId1 string, accountId2 string) {
|
||||
func (this *friendMgr) addBlackList(accountId string, blockId string, addTime int32) {
|
||||
{
|
||||
blacks := this.getBlacks(accountId)
|
||||
if blacks != nil {
|
||||
if blacks == nil {
|
||||
this.blackHash[accountId] = make(map[string]int32)
|
||||
blacks = this.getBlacks(accountId)
|
||||
}
|
||||
|
@ -135,8 +135,9 @@ func (this *player) CMListFriend(hdr *f5.MsgHdr, msg *cs.CMListFriend) {
|
||||
for _, accountId := range(friendList) {
|
||||
userProfile := GetCacheMgr().GetUserProfile(accountId)
|
||||
if userProfile != nil {
|
||||
ele := q5.NewSliceElement(&rspMsg.Users)
|
||||
userProfile.FillMFUser(*ele)
|
||||
ele := new(cs.MFUser)
|
||||
q5.AppendSlice(&rspMsg.Users, ele)
|
||||
userProfile.FillMFUser(ele)
|
||||
}
|
||||
}
|
||||
this.SendMsg(rspMsg)
|
||||
@ -217,8 +218,8 @@ func (this *player) CMAcceptFriendRequest(hdr *f5.MsgHdr, msg *cs.CMAcceptFriend
|
||||
constant.FRIEND_DB,
|
||||
"t_friend_apply",
|
||||
[][]string{
|
||||
{"sender_id", this.GetAccountId()},
|
||||
{"target_id", msg.GetTargetAccountId()},
|
||||
{"sender_id", msg.GetTargetAccountId()},
|
||||
{"target_id", this.GetAccountId()},
|
||||
{"status", q5.ToString(constant.FRIEND_APPLY_STATUS_NONE)},
|
||||
},
|
||||
func (err error, ds *f5.DataSet) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user