From 2f84471a3ee67eba649d67698e97b409648caf31 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Wed, 19 Jan 2022 22:08:19 -0500 Subject: [PATCH 1/4] add missing mentions, fix #399 --- .../stream/status/status.component.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/app/components/stream/status/status.component.ts b/src/app/components/stream/status/status.component.ts index 1c1bbb7f..dd76eae4 100644 --- a/src/app/components/stream/status/status.component.ts +++ b/src/app/components/stream/status/status.component.ts @@ -88,7 +88,8 @@ export class StatusComponent implements OnInit { // const instanceUrl = 'https://' + this.status.uri.split('https://')[1].split('/')[0]; // this.statusAccountName = this.emojiConverter.applyEmojis(this.displayedStatus.account.emojis, this.displayedStatus.account.display_name, EmojiTypeEnum.small); - this.statusContent = this.emojiConverter.applyEmojis(this.displayedStatus.emojis, this.displayedStatus.content, EmojiTypeEnum.medium); + let statusContent = this.emojiConverter.applyEmojis(this.displayedStatus.emojis, this.displayedStatus.content, EmojiTypeEnum.medium); + this.statusContent = this.ensureMentionAreDisplayed(statusContent); } get statusWrapper(): StatusWrapper { return this._statusWrapper; @@ -101,6 +102,22 @@ export class StatusComponent implements OnInit { ngOnInit() { } + private ensureMentionAreDisplayed(data: string): string { + const mentions = this.displayedStatus.mentions; + if(!mentions || mentions.length === 0) return data; + + let textMentions = ''; + for (const m of mentions) { + if(!data.includes(m.url)){ + textMentions += `@${m.username} ` + } + } + if(textMentions !== ''){ + data = textMentions + data; + } + return data; + } + private setContentWarning(status: StatusWrapper) { this.hideStatus = status.hide; this.isContentWarned = status.applyCw; From 59c3b1927132da5ff959a95a7e47678256d93cbc Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Wed, 19 Jan 2022 22:32:50 -0500 Subject: [PATCH 2/4] fix npm version --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 8314b742..0a14ebb9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,7 @@ environment: install: - ps: Install-Product node $env:nodejs_version - set CI=true - - npm install -g npm@latest + - npm install -g npm@6.9.0 - set PATH=%APPDATA%\npm;%PATH% - npm install matrix: From 5c52c9c4f206763ce9e9e932d7cd2890456361c2 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Wed, 19 Jan 2022 22:37:58 -0500 Subject: [PATCH 3/4] bump nodejs version --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 0a14ebb9..62058089 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,7 +5,7 @@ environment: GH_TOKEN: secure: wRRBU0GXTmTBgZBs2PGSaEJWOflynAyvp3Nc/7e9xmciPfkUCQAXcpOn0jIYmzpb matrix: - - nodejs_version: 10.9.0 + - nodejs_version: 10.16.3 install: - ps: Install-Product node $env:nodejs_version - set CI=true From 7cb08877498e98975e0497946c5e04fbbf94c016 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Wed, 19 Jan 2022 22:39:44 -0500 Subject: [PATCH 4/4] disable cache --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 62058089..74910c9c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,11 +1,11 @@ os: unstable cache: - - node_modules + #- node_modules environment: GH_TOKEN: secure: wRRBU0GXTmTBgZBs2PGSaEJWOflynAyvp3Nc/7e9xmciPfkUCQAXcpOn0jIYmzpb matrix: - - nodejs_version: 10.16.3 + - nodejs_version: 10.9.0 install: - ps: Install-Product node $env:nodejs_version - set CI=true