Show "Open chat" if DM already exists

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-07-06 21:56:53 +02:00
parent 7d6342fa40
commit 0b52ad48bb
No known key found for this signature in database
GPG key ID: 9760693FDD98A790
2 changed files with 2 additions and 1 deletions

View file

@ -428,7 +428,7 @@ const UserOptionsSection: React.FC<{
if (!isMe) {
directMessageButton = (
<AccessibleButton onClick={() => openDMForUser(cli, member.userId)} className="mx_UserInfo_field">
{ _t('Direct message') }
{ findDMForUser(cli, member.userId) ? _t("Open chat") : _t('Direct message') }
</AccessibleButton>
);
}