From 5ec56bc8a32d1335137b672b363aa9f4e729a1b8 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Tue, 19 Apr 2022 14:47:53 +0300 Subject: [PATCH] Mentions include self mention on status; prevent dublicates --- pleroma-cli.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pleroma-cli.sh b/pleroma-cli.sh index 272f238..39e618a 100755 --- a/pleroma-cli.sh +++ b/pleroma-cli.sh @@ -521,7 +521,10 @@ reply_mode() echo "$reply_status" | jj content | html_to_txt_render | sed 's/^/> /' > tmp_status.md fi if [ "$copy_mentions" = 'true' ]; then - mentions_reply=$(echo "$reply_status" | jj -l 'mentions.#.acct' | delq | legacy_addr_preprocess | tr '\n' ',' | sed 's/,$//g') + mentions_reply=$(echo "$reply_status" | jj -l 'mentions.#.acct' | delq | legacy_addr_preprocess) + mentions_reply="$mentions_reply\n" + acct_selfstatus=$(echo "$reply_status" | jj account.acct | legacy_addr_preprocess) + mentions_reply=$(echo "$mentions_reply""$acct_selfstatus" | sort -u | tr '\n' ',' | sed -e 's/,$//g; s/^,//g') fi write_status_menu "$(echo "$reply_status" | jj id)" }