diff options
-rw-r--r-- | room.cpp | 10 | ||||
-rw-r--r-- | room.h | 1 |
2 files changed, 11 insertions, 0 deletions
@@ -370,6 +370,16 @@ QList< User* > Room::users() const return d->membersMap.values(); } +QStringList Room::memberNames() const { + QStringList res; + + for (auto u : d->membersMap.values()) { + res.append( this->roomMembername(u) ); + } + + return res; +} + void Room::Private::insertMemberIntoMap(User *u) { auto namesakes = membersMap.values(u->name()); @@ -90,6 +90,7 @@ namespace QMatrixClient QList<User*> membersLeft() const; Q_INVOKABLE QList<User*> users() const; + Q_INVOKABLE QStringList memberNames() const; /** * @brief Produces a disambiguated name for a given user in |