diff --git a/config.json b/config.json index 22d4df4..cd257b5 100644 --- a/config.json +++ b/config.json @@ -3,6 +3,7 @@ "max_statuses": 40, "per_status_mode": false, "enabled_nsfw": false, + "hide_reblogs": false, "default_content_type": "text/markdown", "default_visibility": "unlisted", "format_time": "+%d.%m.%Y %H:%M:%S", diff --git a/pleroma-cli.sh b/pleroma-cli.sh index 3238d22..0089d29 100755 --- a/pleroma-cli.sh +++ b/pleroma-cli.sh @@ -6,6 +6,7 @@ instance_point="https://$instance/api/v1" instance_point_pleroma="https://$instance/api/pleroma" instance_hist='instance.hist' enabled_nsfw=$(jj -i config.json enabled_nsfw) +hide_reblogs=$(jj -i config.json hide_reblogs) max_statuses=$(jj -i config.json max_statuses) default_visibility=$(jj -i config.json default_visibility) default_content_type=$(jj -i config.json default_content_type) @@ -325,9 +326,11 @@ statuses_render() fi for i in $ids_massive; do status=$(echo "$jsonmassive" | jj "#[id=$i]") - - whoacct=$(echo "$status" | jj account.acct) reblog=$(echo "$status" | jj reblog.id) + if [ "$hide_reblogs" = 'true' ] && [ -n "$reblog" ]; then + continue + fi + whoacct=$(echo "$status" | jj account.acct) reblogacct=$(echo "$status" | jj reblog.account.acct) uri=$(echo "$status" | jj uri) id_status=$(echo "$status" | jj id)