From 74f7bf9968089def8809ce445cdfcbe71646fe4f Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Wed, 13 Apr 2022 13:50:56 +0300 Subject: [PATCH] added: reply to status --- pleroma-cli.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pleroma-cli.sh b/pleroma-cli.sh index aa2fd96..e500680 100755 --- a/pleroma-cli.sh +++ b/pleroma-cli.sh @@ -156,7 +156,7 @@ timeline_menu() indexator=$(expr $indexator - 1) echo '_____' done - menu=$(echo 'Prev\nNext\nShare\nThread\nMain menu' | fzy) + menu=$(echo 'Prev\nNext\nReply\nShare\nThread\nMain menu' | fzy) case $menu in "Prev") indexator=$(expr $max_statuses - 1) @@ -172,6 +172,11 @@ timeline_menu() offset=$(jj -i preload 0.id) json=$(timeline_api $offset) ;; + "Reply") + echo 'Input id' + read status_id + write_status_menu $status_id + ;; "Share") echo 'Input id (s - stop)' sharemode=1 @@ -208,7 +213,8 @@ write_api_status() curl -s --compressed -H "Authorization: Bearer $auth" --url $instance_point/statuses \ --data-urlencode "status=$1" \ --data-urlencode "content_type=$content_type" \ - --data-urlencode "visibility=$status_visibility" + --data-urlencode "visibility=$status_visibility" \ + --data-urlencode "in_reply_to_id=$replyto" } write_status_menu() @@ -216,6 +222,7 @@ write_status_menu() touch tmp_status.md content_type="$default_content_type" status_visibility="$default_visibility" + replyto=$1 sub_menu_lvl=1 while [ $sub_menu_lvl -eq 1 ]; do clear @@ -225,6 +232,9 @@ write_status_menu() echo "Chars: $(cat tmp_status.md | wc -m)" echo "Visiblity: $status_visibility" echo "Content type: $content_type" + if [ -n "$replyto" ]; then + echo "Reply to: $replyto" + fi wrirepostmenu=$(echo "Write\nSend\nChange type\nVisiblity\nMain menu" | fzy) case $wrirepostmenu in "Write") echo > tmp_status.md; $EDITOR tmp_status.md ;;