aboutsummaryrefslogtreecommitdiff
path: root/room.cpp
diff options
context:
space:
mode:
authorFelix Rohrbach <fxrh@gmx.de>2016-09-15 02:51:03 +0200
committerGitHub <noreply@github.com>2016-09-15 02:51:03 +0200
commitc8a34813a551752bf647a0c91a6ee37c95e50251 (patch)
treea90054ab6a44fd9d63c6143a4290bf54bc041e92 /room.cpp
parentd1dfe71769accc391a0a722bd4627b2d18389874 (diff)
parent51ebad8717dcda968dc30195d98545b4091ad251 (diff)
downloadlibquotient-c8a34813a551752bf647a0c91a6ee37c95e50251.tar.gz
libquotient-c8a34813a551752bf647a0c91a6ee37c95e50251.zip
Merge pull request #28 from Fxrh/correct-roomname-by-usernames
Correct user sorting for room name creation
Diffstat (limited to 'room.cpp')
-rw-r--r--room.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/room.cpp b/room.cpp
index c7bf0208..5b390cea 100644
--- a/room.cpp
+++ b/room.cpp
@@ -497,7 +497,8 @@ QString Room::Private::roomNameFromMemberNames(const QList<User *> &userlist) co
first_two.begin(), first_two.end(),
[this](const User* u1, const User* u2) {
// Filter out the "me" user so that it never hits the room name
- return u1 != connection->user() && u1->id() < u2->id();
+ return u2 == connection->user() ||
+ (u1 != connection->user() && u1->id() < u2->id());
}
);