From 7f460caf6bd2099b1136347e630984fad6e0acac Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 3 Dec 2020 17:31:24 +0100 Subject: [PATCH] don't show identifier if already shown in name --- src/preview/PreviewViewModel.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/preview/PreviewViewModel.js b/src/preview/PreviewViewModel.js index 3f90daa..3be8b11 100644 --- a/src/preview/PreviewViewModel.js +++ b/src/preview/PreviewViewModel.js @@ -93,6 +93,9 @@ export class PreviewViewModel extends ViewModel { this.memberCount = publicRoom?.num_joined_members; this.topic = publicRoom?.topic; this.identifier = publicRoom?.canonical_alias || link.identifier; + if (this.identifier === this.name) { + this.identifier = null; + } } _setNoPreview(link) {