feat: send contact list

This commit is contained in:
semenov
2025-07-29 11:14:50 +03:00
parent 5c80f6824a
commit 5076da14e0
6 changed files with 63 additions and 3 deletions

View File

@@ -425,6 +425,30 @@ void ProcessingSystem::processingClientQueryToDB(ClientHandler *client, ClientQu
}
break;
}
case TypeQueryToDB::TYPE_QUERY_GET_CONTACT_LIST:
{
QList<User> entitylist;
QList<Instructor> listInstructor = providerDBLMS->GetListAllInstructors();
QList<Trainee> listTrainees = providerDBLMS->GetListAllTrainees();
for (Instructor instructor : listInstructor)
{
entitylist.append(static_cast<User>(instructor));
}
for (Trainee trainee : listTrainees)
{
entitylist.append(static_cast<User>(trainee));
}
QByteArray arrayAnswer;
arrayAnswer = dataParser->DbAnswer()->listContacts(true, &entitylist);
client->sendFileBlockByteArray(arrayAnswer,PacketType::TYPE_BIGXML);
}
}
}