mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-22 14:31:28 +00:00
favorite support added
This commit is contained in:
parent
5e47e1677c
commit
3cdfdf4cf7
|
@ -345,7 +345,7 @@ timeline_menu()
|
||||||
indexator=$(expr $indexator - 1)
|
indexator=$(expr $indexator - 1)
|
||||||
echo '_____'
|
echo '_____'
|
||||||
done
|
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
|
case $menu in
|
||||||
"Prev")
|
"Prev")
|
||||||
indexator=$(expr $max_statuses - 1)
|
indexator=$(expr $max_statuses - 1)
|
||||||
|
@ -380,6 +380,19 @@ timeline_menu()
|
||||||
fi
|
fi
|
||||||
done
|
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")
|
"Thread")
|
||||||
indexator=$(expr $max_statuses - 1)
|
indexator=$(expr $max_statuses - 1)
|
||||||
echo 'Input id'
|
echo 'Input id'
|
||||||
|
@ -398,6 +411,11 @@ share_api_status()
|
||||||
post_request -w "%{http_code}" --url $instance_point/statuses/$1/reblog --output /dev/null
|
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()
|
write_api_status()
|
||||||
{
|
{
|
||||||
if [ -n "$mediaattach" ]; then
|
if [ -n "$mediaattach" ]; then
|
||||||
|
|
Loading…
Reference in a new issue