#pragma once
#include "message/model/message_model.pb.h"
#include "Tools/CsdkCommonTools.h"

namespace CsdkSessionTool
{
	heroim::client::v3beta::dto::message::model::SessionKey* MakePbSessionKey(const FCsdkSessionId& SessionId);

	inline FCsdkSessionId ConvertSessionId(const heroim::client::v3beta::dto::message::model::SessionKey& PbSessionKey)
	{
		FCsdkSessionId SessionId;
		SessionId.ReceiverId = STD_STRING_TO_FSTRING(PbSessionKey.targetid());
		SessionId.ServerId = STD_STRING_TO_FSTRING(PbSessionKey.serverid());
		SessionId.Type = static_cast<ECsdkSessionType::Type>(PbSessionKey.sessiontype());
		return SessionId;
	}
}
