feat: delay message draft

This commit is contained in:
semenov
2025-08-05 14:45:16 +03:00
parent 33c7a31143
commit a6022d7ec8
9 changed files with 219 additions and 241 deletions

View File

@@ -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();

View File

@@ -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)

View File

@@ -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: