FIX: correctly show "chat with" and not "chat in" for users ()

Prior to this fix direct message would always show "Chat in ..." when hovering the channel even if you were hovering a direct message channel with another user (or yourself).

We will now correctly show:

- `Chat in ...` for group channels
- `Chat with ...` for direct message channels
This commit is contained in:
Joffrey JAFFEUX 2023-11-30 19:02:19 +01:00 committed by GitHub
parent 9fb4175008
commit a1ae9f6ab0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -273,9 +273,15 @@ export default {
}
get title() {
if (this.channel.chatable.group) {
return I18n.t("chat.placeholder_channel", {
channelName: this.channel.escapedTitle,
});
} else {
return I18n.t("chat.placeholder_users", {
commaSeparatedNames: this.channel.chatable.users[0].username,
});
}
}
get text() {