1
This commit is contained in:
parent
ac609a53c6
commit
11ff251eb2
4
server/imserver/cache/cachemgr.go
vendored
4
server/imserver/cache/cachemgr.go
vendored
@ -179,6 +179,10 @@ func (this *cacheMgr) AsyncSearch(sinceId int64, q string, pbUsers *[]*cs.MFUser
|
||||
})
|
||||
}
|
||||
|
||||
func (this *cacheMgr) AsyncRecommendList(int32, string, *[]*cs.MFUser, func(int32, string)) {
|
||||
|
||||
}
|
||||
|
||||
func (this *cacheMgr) getUser(accountId string) *userProfile {
|
||||
if val, ok := this.userHash[accountId]; ok {
|
||||
return val
|
||||
|
@ -108,6 +108,7 @@ type CacheMgr interface {
|
||||
AsyncGetUsersAndFillMFUser([]string, *[]*cs.MFUser, func(int32, string))
|
||||
AsyncGetUsersAndFillMFGuildMember([]string, *[]*cs.MFGuildMember, func(int32, string))
|
||||
AsyncSearch(int64, string, *[]*cs.MFUser, func(int32, string, int64))
|
||||
AsyncRecommendList(int32, string, *[]*cs.MFUser, func(int32, string))
|
||||
}
|
||||
|
||||
type DbLogMgr interface {
|
||||
|
@ -324,7 +324,17 @@ func (this *player) CMInviteFriendMsg(hdr *f5.MsgHdr, msg *cs.CMInviteFriendMsg)
|
||||
|
||||
func (this *player) CMRecommendList(hdr *f5.MsgHdr, msg *cs.CMRecommendList) {
|
||||
rspMsg := new(cs.SMRecommendList)
|
||||
this.SendMsg(rspMsg)
|
||||
GetCacheMgr().AsyncRecommendList(
|
||||
msg.GetType(),
|
||||
this.GetAccountId(),
|
||||
&rspMsg.Users,
|
||||
func (errCode int32, errMsg string) {
|
||||
if errCode != 0 {
|
||||
this.SendMsg(rspMsg.Err(500, "server internal error"))
|
||||
return
|
||||
}
|
||||
this.SendMsg(rspMsg)
|
||||
})
|
||||
}
|
||||
|
||||
func (this *player) CMSendChatMsg(hdr *f5.MsgHdr, msg *cs.CMSendChatMsg) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user