Now notifications have actions! Some more usefull functions to roster model

This commit is contained in:
Blue 2022-04-24 18:52:29 +03:00
parent 3916aec358
commit e58213b294
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
15 changed files with 205 additions and 30 deletions

View file

@ -264,6 +264,16 @@ void Models::Room::removeParticipant(const QString& p_name)
}
}
Models::Participant * Models::Room::getParticipant(const QString& p_name)
{
std::map<QString, Participant*>::const_iterator itr = participants.find(p_name);
if (itr == participants.end()) {
return nullptr;
} else {
return itr->second;
}
}
void Models::Room::handleParticipantUpdate(std::map<QString, Participant*>::const_iterator itr, const QMap<QString, QVariant>& data)
{
Participant* part = itr->second;