This commit is contained in:
aozhiwei 2020-09-24 14:06:54 +08:00
parent d850e28a88
commit aa0e313b9b
2 changed files with 8 additions and 4 deletions

View File

@ -1133,10 +1133,12 @@ void Player::ForwardGuildCMMsg(f8::MsgHdr& hdr, long long guild_id)
{
ss::SS_IM_ForwardGuildCMMsg msg;
FillIMMsgConext(msg.mutable_context());
msg.set_msgid(hdr.msgid);
if (hdr.buflen > 0) {
msg.mutable_payload()->assign(hdr.buf, hdr.buflen);
}
SyncHelper::Instance()->SendIMConnMsg(0, msg);
SyncHelper::Instance()->SendIMConnMsg(JsonDataMgr::Instance()->GetIMInstanceId(guild_id),
msg);
}
void Player::FillMFUserInfo(cs::MFUserInfo* user_info)

View File

@ -1,5 +1,7 @@
#pragma once
#include "jsondatamgr.h"
namespace ss
{
class SS_IM_FriendAgreeRequest;
@ -48,13 +50,13 @@ public:
void BroadcastIMConnMsg(int msgid, ::google::protobuf::Message& msg);
template <typename T>
void SendIMConnMsg(int intance_id, const T& msg)
void SendIMConnMsg(int instance_id, const T& msg)
{
static int msgid = f8::Net_GetMessageId(msg);
SendIMConnMsg(msgid, msg);
SendIMConnMsg(instance_id, msgid, msg);
}
void SendIMConnMsg(int intance_id, int msgid, const ::google::protobuf::Message& msg);
void SendIMConnMsg(int instance_id, int msgid, const ::google::protobuf::Message& msg);
std::map<long long, timer_list*> pending_request_hash_;
};