diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-02-25 18:25:22 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-02-26 09:06:09 +0900 |
commit | e77a53946805649be99f8c0f6ee9c00702348132 (patch) | |
tree | 919f81369b439414842c272713c2802b257674b9 | |
parent | fea4f3b5c8d313b429777a8c73ee520af24eecfe (diff) | |
download | libquotient-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.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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]); |