From c2812fae435df45f19bea4a0c78a0e725403d73b Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Wed, 14 Jul 2021 21:00:52 -0400 Subject: [PATCH 1/7] fix mention bug --- .../create-status/create-status.component.ts | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/app/components/create-status/create-status.component.ts b/src/app/components/create-status/create-status.component.ts index 1611a42e..0f3430d5 100644 --- a/src/app/components/create-status/create-status.component.ts +++ b/src/app/components/create-status/create-status.component.ts @@ -225,7 +225,7 @@ export class CreateStatusComponent implements OnInit, OnDestroy { // this.status = state; // } else { if (!this.status || this.status === '') { - const uniqueMentions = this.getMentions(this.statusReplyingTo, this.statusReplyingToWrapper.provider); + const uniqueMentions = this.getMentions(this.statusReplyingTo); for (const mention of uniqueMentions) { this.status += `@${mention} `; } @@ -492,8 +492,20 @@ export class CreateStatusComponent implements OnInit, OnDestroy { return cwLength; } - private getMentions(status: Status, providerInfo: AccountInfo): string[] { - const mentions = [status.account.acct, ...status.mentions.map(x => x.acct)]; + private getMentions(status: Status): string[] { + let acct = status.account.acct; + if(!acct.includes('@')) { + acct += `@${status.account.url.replace('https://', '').split('/')[0]}` + } + + const mentions = [acct]; + status.mentions.forEach(m => { + let mentionAcct = m.acct; + if(!mentionAcct.includes('@')){ + mentionAcct += `@${m.url.replace('https://', '').split('/')[0]}`; + } + mentions.push(mentionAcct); + }); let uniqueMentions = []; for (let mention of mentions) { @@ -502,22 +514,10 @@ export class CreateStatusComponent implements OnInit, OnDestroy { } } - let globalUniqueMentions = []; - for (let mention of uniqueMentions) { - if (!mention.includes('@')) { - if (providerInfo) { - mention += `@${providerInfo.instance}`; - } else { - mention += `@${status.url.replace('https://', '').split('/')[0]}`; - } - } - globalUniqueMentions.push(mention); - } - const selectedUser = this.toolsService.getSelectedAccounts()[0]; - globalUniqueMentions = globalUniqueMentions.filter(x => x.toLowerCase() !== `${selectedUser.username}@${selectedUser.instance}`.toLowerCase()); + uniqueMentions = uniqueMentions.filter(x => x.toLowerCase() !== `${selectedUser.username}@${selectedUser.instance}`.toLowerCase()); - return globalUniqueMentions; + return uniqueMentions; } onCtrlEnter(): boolean { From a85e24b77f6036efaec25b28c298daae91cebf00 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Wed, 14 Jul 2021 21:04:58 -0400 Subject: [PATCH 2/7] road to 1.1.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9347980..9fe702e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sengi", - "version": "1.1.3", + "version": "1.1.4", "license": "AGPL-3.0-or-later", "main": "main-electron.js", "description": "A multi-account desktop client for Mastodon and Pleroma", From 1ebbece7ab498a53c5e0bf5537c5cb03375d3dbd Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Thu, 15 Jul 2021 00:05:28 -0400 Subject: [PATCH 3/7] CICD --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 45c06e1b..d0cf7d85 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ docker run -d -p 80:80 nicolasconstant/sengi Find more informations [here](https://github.com/NicolasConstant/sengi/blob/master/DOCKER.md). -The docker image also provide a landing page so that you can open a pop-up really easily.
+The docker image also provide a landing page so that you can open a pop-up really easily.
It's available in ```https://your-host/start/index.html``` ## Contact From 6554a359b55c402306471afc462a877035406659 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Thu, 15 Jul 2021 00:09:27 -0400 Subject: [PATCH 4/7] CICD --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d0cf7d85..45c06e1b 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ docker run -d -p 80:80 nicolasconstant/sengi Find more informations [here](https://github.com/NicolasConstant/sengi/blob/master/DOCKER.md). -The docker image also provide a landing page so that you can open a pop-up really easily.
+The docker image also provide a landing page so that you can open a pop-up really easily.
It's available in ```https://your-host/start/index.html``` ## Contact From 0956b623ce97e964faa417c5e29fdc56fd657a0e Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Thu, 15 Jul 2021 00:31:33 -0400 Subject: [PATCH 5/7] changed electron-builder version --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b9c82180..2087b3ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ addons: install: - nvm install 10.9.0 - - npm install electron-builder@next + - npm install electron-builder@latest - npm install - npm rebuild node-sass - export DISPLAY=':99.0' @@ -44,4 +44,4 @@ before_script: - sleep 3 script: -- npm run travis \ No newline at end of file +- npm run travis From 70bef7b98ea233a1ac25bd4b12cc6edc2f7cea15 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Thu, 15 Jul 2021 00:43:26 -0400 Subject: [PATCH 6/7] changed eletron-builder version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2087b3ce..ba929588 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ addons: install: - nvm install 10.9.0 - - npm install electron-builder@latest + - npm install electron-builder@22.11.5 - npm install - npm rebuild node-sass - export DISPLAY=':99.0' From 3f01c70bc9854d5c3f2764b913999af547152aa4 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Thu, 15 Jul 2021 00:49:59 -0400 Subject: [PATCH 7/7] changed electron-builder version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ba929588..b79fa31f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ addons: install: - nvm install 10.9.0 - - npm install electron-builder@22.11.5 + - npm install electron-builder@22.10.5 - npm install - npm rebuild node-sass - export DISPLAY=':99.0'