diff --git a/pleroma-cli.sh b/pleroma-cli.sh index 1204218..240173e 100755 --- a/pleroma-cli.sh +++ b/pleroma-cli.sh @@ -345,7 +345,7 @@ timeline_menu() indexator=$(expr $indexator - 1) echo '_____' done - menu=$(echo 'Prev\nNext\nReply\nShare\nThread\nMain menu' | fzy) + menu=$(echo 'Prev\nNext\nReply\nShare\nFavorite\nThread\nMain menu' | fzy) case $menu in "Prev") indexator=$(expr $max_statuses - 1) @@ -380,6 +380,19 @@ timeline_menu() fi done ;; + "Favorite") + echo 'Input id (s - stop)' + favoritemode=1 + while [ $favoritemode -eq 1 ]; do + read status_id + if [ "$status_id" = 's' ]; then + favoritemode=0 + else + favorite_api_status $status_id + echo $http_code + fi + done + ;; "Thread") indexator=$(expr $max_statuses - 1) echo 'Input id' @@ -398,6 +411,11 @@ share_api_status() post_request -w "%{http_code}" --url $instance_point/statuses/$1/reblog --output /dev/null } +favorite_api_status() +{ + post_request -w "%{http_code}" --url $instance_point/statuses/$1/favourite --output /dev/null +} + write_api_status() { if [ -n "$mediaattach" ]; then