Skip to content
Snippets Groups Projects
Commit 8830ce25 authored by Loren Burkholder's avatar Loren Burkholder
Browse files

Don't add a user twice

parent b1c1274d
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,10 @@ InviteesModel::InviteesModel(QObject *parent)
void
InviteesModel::addUser(QString mxid)
{
for (const auto &invitee : invitees_)
if (invitee->mxid_ == mxid)
return;
beginInsertRows(QModelIndex(), invitees_.count(), invitees_.count());
auto invitee = new Invitee{mxid, this};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment