use display name for DMs in channel list

This commit is contained in:
ouwou
2023-06-13 22:25:25 -04:00
parent e097342f55
commit 5d9f7832d7

View File

@@ -147,13 +147,13 @@ std::string ChannelData::GetRecipientsDisplay() const {
const auto recipients = GetDMRecipients();
if (Type == ChannelType::DM && !recipients.empty()) {
return recipients[0].Username;
return recipients[0].GetDisplayName();
}
Glib::ustring r;
for (size_t i = 0; i < recipients.size(); i++) {
const auto &recipient = recipients[i];
r += recipient.Username;
r += recipient.GetDisplayName();
if (i < recipients.size() - 1) {
r += ", ";
}