1
This commit is contained in:
parent
f0501aaf11
commit
1807268f9e
@ -7,6 +7,7 @@
|
||||
#include "dbhelper.h"
|
||||
#include "player.h"
|
||||
#include "app.h"
|
||||
#include "synchelper.h"
|
||||
|
||||
void DBHelper::Init()
|
||||
{
|
||||
@ -107,6 +108,7 @@ void DBHelper::AddFriendApply(Player* hum, const std::string& target_id)
|
||||
on_error,
|
||||
friend_crc32_code
|
||||
);
|
||||
SyncHelper::Instance()->SyncApplyFriend(hum, target_id);
|
||||
}
|
||||
|
||||
void DBHelper::AddEvent(const std::string& sender_id,
|
||||
|
@ -85,6 +85,15 @@ void SyncHelper::SyncUpdateFriend(Player* hum, const std::string& target_id)
|
||||
|
||||
}
|
||||
|
||||
void SyncHelper::SyncApplyFriend(Player* hum, const std::string& target_id)
|
||||
{
|
||||
ss::SS_IM_FriendApply* notifymsg = new ss::SS_IM_FriendApply();
|
||||
hum->FillIMMsgConext(notifymsg->mutable_context());
|
||||
notifymsg->set_target_id(target_id);
|
||||
BroadcastIMConnMsg(*notifymsg);
|
||||
delete notifymsg;
|
||||
}
|
||||
|
||||
void SyncHelper::BroadcastIMConnMsg(int msgid, ::google::protobuf::Message& msg)
|
||||
{
|
||||
IMConnMgr::Instance()->TraverseIMConn
|
||||
|
@ -26,6 +26,7 @@ public:
|
||||
void SyncNewFriend(Player* hum, const std::string& target_id);
|
||||
void SyncDeleteFriend(Player* hum, const std::string& target_id);
|
||||
void SyncUpdateFriend(Player* hum, const std::string& target_id);
|
||||
void SyncApplyFriend(Player* hum, const std::string& target_id);
|
||||
|
||||
void _SS_IM_FriendAgreeResponse(f8::MsgHdr& hdr, const ss::SS_IM_FriendAgreeResponse& msg);
|
||||
void _SS_IM_FriendDeleteResponse(f8::MsgHdr& hdr, const ss::SS_IM_FriendDeleteResponse& msg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user