Mentions include self mention on status; prevent dublicates

This commit is contained in:
localhost_frssoft 2022-04-19 14:47:53 +03:00
parent 135554fe5b
commit 5ec56bc8a3
1 changed files with 4 additions and 1 deletions

View File

@ -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)"
}