Hide reblogs; default visiblity

This commit is contained in:
localhost_frssoft 2022-08-12 18:36:44 +03:00
parent 63318b6822
commit 14743dc871
3 changed files with 10 additions and 0 deletions

View file

@ -2,6 +2,7 @@
"instance": "soc.phreedom.club", "instance": "soc.phreedom.club",
"statuses_file_archive": true, "statuses_file_archive": true,
"statuses_file_archive_after_time": 86400, "statuses_file_archive_after_time": 86400,
"notload_reblogs": true,
"main_proxy": "", "main_proxy": "",
"connect_protocol_via_main_proxy": "https", "connect_protocol_via_main_proxy": "https",
"i2p_http_proxy_addr": "http://127.0.0.1:4444", "i2p_http_proxy_addr": "http://127.0.0.1:4444",

View file

@ -870,6 +870,7 @@ if [ "$daemon_mode" = 'yes' ]; then
mediaattach=$(echo $attach_id | sed 's/,$//g') mediaattach=$(echo $attach_id | sed 's/,$//g')
echo $mediaattach echo $mediaattach
fi fi
status_visibility="$default_visibility"
write_api_status $dir_write_status/message write_api_status $dir_write_status/message
rm $write_status_action rm $write_status_action
fi fi

View file

@ -4,6 +4,8 @@
json="$(cat)" json="$(cat)"
ids=$(echo "$json" | jj -l '#.id' | sed 's/"//g') ids=$(echo "$json" | jj -l '#.id' | sed 's/"//g')
notload_reblogs=$(jj -i "$main_basedir"/config.json notload_reblogs)
mkdir -p "$main_basedir/all_statuses/$instance" mkdir -p "$main_basedir/all_statuses/$instance"
mkdir -p "$main_basedir/statuses/$instance" mkdir -p "$main_basedir/statuses/$instance"
mkdir -p "$main_basedir/timelines/$instance/$timeline" mkdir -p "$main_basedir/timelines/$instance/$timeline"
@ -20,6 +22,12 @@ for i in $ids; do
continue continue
fi fi
status_date=$(echo "$json" | jj "#[id=$1].created_at") status_date=$(echo "$json" | jj "#[id=$1].created_at")
reblog_id=$(echo "$json" | jj "#[id=$1].reblog.id")
if [ "$notload_reblogs" = 'true' ] && [ -n "$reblog_id" ]; then
ids=$(echo "$ids" | sed -E "s/.?$i.?//g")
continue
fi
mkdir -m 711 -p "$main_basedir"/all_statuses/$instance/$i mkdir -m 711 -p "$main_basedir"/all_statuses/$instance/$i
touch -d "$status_date" "$main_basedir"/all_statuses/$instance/$i touch -d "$status_date" "$main_basedir"/all_statuses/$instance/$i
echo "$json" | jj -p "#[id=$i]" > "$main_basedir"/all_statuses/$instance/$i/$i.json echo "$json" | jj -p "#[id=$i]" > "$main_basedir"/all_statuses/$instance/$i/$i.json