aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-02-25 18:25:22 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-02-26 09:06:09 +0900
commite77a53946805649be99f8c0f6ee9c00702348132 (patch)
tree919f81369b439414842c272713c2802b257674b9
parentfea4f3b5c8d313b429777a8c73ee520af24eecfe (diff)
downloadlibquotient-e77a53946805649be99f8c0f6ee9c00702348132.tar.gz
libquotient-e77a53946805649be99f8c0f6ee9c00702348132.zip
Room: show 1-on-1 invitations in a better way
Previously it was just an "Empty room" name, now it's "Invitation from %1".
-rw-r--r--room.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/room.cpp b/room.cpp
index 06041090..762e929c 100644
--- a/room.cpp
+++ b/room.cpp
@@ -1452,6 +1452,12 @@ QString Room::Private::roomNameFromMemberNames(const QList<User *> &userlist) co
}
);
+ // Spec extension. A single person in the chat but not the local user
+ // (the local user is apparently invited).
+ if (userlist.size() == 1 && !isLocalUser(first_two.front()))
+ return tr("Invitation from %1")
+ .arg(q->roomMembername(first_two.front()));
+
// i. One-on-one chat. first_two[1] == localUser() in this case.
if (userlist.size() == 2)
return q->roomMembername(first_two[0]);