mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
feat: delay message draft
This commit is contained in:
@@ -26,7 +26,9 @@ bool ChatSystem::sendTo(ClientMessage message)
|
||||
QByteArray byteArrayMsg = dataParser->ClientAnswer()->message(message.From,message.To,message.Text);
|
||||
|
||||
auto result = message.To.split("-");
|
||||
|
||||
//qt - инструктор
|
||||
//qt - клиент нельзя
|
||||
//unity - можно
|
||||
foreach(int idSocket, clientsMap->keys())
|
||||
{
|
||||
ClientHandler *handler = clientsMap->value(idSocket);
|
||||
@@ -71,6 +73,7 @@ bool ChatSystem::sendMessage(ClientMessage message)
|
||||
|
||||
void ChatSystem::sendOldMessages(QString id)
|
||||
{
|
||||
qDebug() << id;
|
||||
if (clientNotSendedMessage->contains(id))
|
||||
{
|
||||
auto stack = clientNotSendedMessage->find(id).value();
|
||||
|
||||
@@ -568,6 +568,10 @@ void ProcessingSystem::processingClientNotify(ClientHandler *client, ClientNotif
|
||||
{
|
||||
sendTaskListToUnity(client);
|
||||
}
|
||||
else if (clientNotify.Code == commandeGetOfflineMessages)
|
||||
{
|
||||
chatSystem->sendOldMessages(client->getClient()->getId() + "-" + QString::number(1));
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessingSystem::setCurrentDataInfo(DataInfo *dataInfo)
|
||||
|
||||
@@ -47,6 +47,7 @@ static const QString commandChangable = "CHANGEABLE";
|
||||
static const QString commandUnchangable = "UNCHANGEABLE";
|
||||
static const QString commandUpdateFilesClient = "update";
|
||||
static const QString commandGetTasks = "GETTASKS";
|
||||
static const QString commandeGetOfflineMessages = "GETOFFLINEMESSAGE";
|
||||
|
||||
class Tools {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user