完成事件记录
This commit is contained in:
parent
154959fbce
commit
9e3e8d4011
@ -37,6 +37,7 @@ enum NetHandler_e
|
||||
const char* const PROJ_NAME_FMT = "friend_imserver";
|
||||
const char* const PROJ_ROOT_FMT = "/data/logs/%s";
|
||||
|
||||
const char* const EVENT_FRIEND_AGREE = "friend.agree";
|
||||
const char* const EVENT_FRIEND_DELETE = "friend.delete";
|
||||
|
||||
const int MAX_INSTANCE_ID = 1023;
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "app.h"
|
||||
#include "IMConn.h"
|
||||
#include "IMConnMgr.h"
|
||||
#include "dbhelper.h"
|
||||
|
||||
#include "cs_proto.pb.h"
|
||||
#include "ss_proto.pb.h"
|
||||
@ -140,10 +141,26 @@ void SyncHelper::RemovePendingRequest(long long seqid)
|
||||
|
||||
void SyncHelper::SS_IM_FriendAgreeRequest_TimeOut(ss::SS_IM_FriendAgreeRequest* msg)
|
||||
{
|
||||
|
||||
std::string event_data;
|
||||
msg->context().user_info().SerializeToString(&event_data);
|
||||
DBHelper::Instance()->AddEvent
|
||||
(
|
||||
msg->context().user_info().base_data().account_id(),
|
||||
msg->target_id(),
|
||||
EVENT_FRIEND_AGREE,
|
||||
event_data
|
||||
);
|
||||
}
|
||||
|
||||
void SyncHelper::SS_IM_FriendDeleteRequest_TimeOut(ss::SS_IM_FriendDeleteRequest* msg)
|
||||
{
|
||||
|
||||
std::string event_data;
|
||||
msg->context().user_info().SerializeToString(&event_data);
|
||||
DBHelper::Instance()->AddEvent
|
||||
(
|
||||
msg->context().user_info().base_data().account_id(),
|
||||
msg->target_id(),
|
||||
EVENT_FRIEND_DELETE,
|
||||
event_data
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user