From e77a53946805649be99f8c0f6ee9c00702348132 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 25 Feb 2018 18:25:22 +0900 Subject: Room: show 1-on-1 invitations in a better way Previously it was just an "Empty room" name, now it's "Invitation from %1". --- room.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 &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]); -- cgit v1.2.3