diff --git a/server/imserver_new/cache/cachemgr.go b/server/imserver_new/cache/cachemgr.go index 47ced52e..8fd84d3a 100644 --- a/server/imserver_new/cache/cachemgr.go +++ b/server/imserver_new/cache/cachemgr.go @@ -64,6 +64,9 @@ func (this *cacheMgr) AsyncSearch(sinceId int64, q string, u := newUserProfile() u.accountId = pg.Rows.GetByName("account_id") u.name = pg.Rows.GetByName("name") + u.avatarUrl = pg.Rows.GetByName("avatar") + u.head = pg.Rows.GetByName("head") + u.lastLoginTime = q5.ToInt32(pg.Rows.GetByName("last_login_time")) this.userHash[u.accountId] = u *q5.NewSliceElement(&users) = u.accountId @@ -71,3 +74,7 @@ func (this *cacheMgr) AsyncSearch(sinceId int64, q string, cb(0, "", lastSinceId, users) }) } + +func (this *cacheMgr) internalGetUsers(accountIds []string, cb func(int32, string)) { + +} diff --git a/server/imserver_new/cache/user_profile.go b/server/imserver_new/cache/user_profile.go index b9e63d48..5fcd8e6c 100644 --- a/server/imserver_new/cache/user_profile.go +++ b/server/imserver_new/cache/user_profile.go @@ -1,6 +1,7 @@ package cache import ( + "q5" "cs" "github.com/golang/protobuf/proto" ) @@ -60,6 +61,11 @@ func (this *userProfile) GetLastLoginTime() int32 { func (this *userProfile) FillMFUser(pbUser *cs.MFUser) { pbUser.AccountId = proto.String(this.accountId) pbUser.Username = proto.String(this.name) + pbUser.Avatar = proto.Int32(q5.ToInt32(this.avatarUrl)) + pbUser.AvatarHead = proto.Int32(q5.ToInt32(this.head)) + pbUser.Rank = proto.Int32(this.rank) + pbUser.OnlineStatus = proto.Int32(0) + pbUser.LastLoginTime = proto.Int32(this.lastLoginTime) } func newUserProfile() *userProfile { diff --git a/server/imserver_new/player/player.go b/server/imserver_new/player/player.go index 8674afcd..da584caa 100644 --- a/server/imserver_new/player/player.go +++ b/server/imserver_new/player/player.go @@ -92,6 +92,9 @@ func (this *player) CMSearchUserByAccountId(hdr *f5.MsgHdr, msg *cs.CMSearchUser } func (this *player) CMListPendingFriendRequest(hdr *f5.MsgHdr, msg *cs.CMListPendingFriendRequest) { + rspMsg := new(cs.SMListPendingFriendRequest) + this.SendMsg(rspMsg) + /* GetFriendMgr().AsyncGetApplyList( 0, this.GetAccountId(), @@ -117,7 +120,7 @@ func (this *player) CMListPendingFriendRequest(hdr *f5.MsgHdr, msg *cs.CMListPen } this.SendMsg(rspMsg) }) - }) + })*/ } func (this *player) CMListFriend(hdr *f5.MsgHdr, msg *cs.CMListFriend) {