mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-22 02:01:27 +00:00
Hide reblogs; default visiblity
This commit is contained in:
parent
63318b6822
commit
14743dc871
|
@ -2,6 +2,7 @@
|
|||
"instance": "soc.phreedom.club",
|
||||
"statuses_file_archive": true,
|
||||
"statuses_file_archive_after_time": 86400,
|
||||
"notload_reblogs": true,
|
||||
"main_proxy": "",
|
||||
"connect_protocol_via_main_proxy": "https",
|
||||
"i2p_http_proxy_addr": "http://127.0.0.1:4444",
|
||||
|
|
|
@ -870,6 +870,7 @@ if [ "$daemon_mode" = 'yes' ]; then
|
|||
mediaattach=$(echo $attach_id | sed 's/,$//g')
|
||||
echo $mediaattach
|
||||
fi
|
||||
status_visibility="$default_visibility"
|
||||
write_api_status $dir_write_status/message
|
||||
rm $write_status_action
|
||||
fi
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
json="$(cat)"
|
||||
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/statuses/$instance"
|
||||
mkdir -p "$main_basedir/timelines/$instance/$timeline"
|
||||
|
@ -20,6 +22,12 @@ for i in $ids; do
|
|||
continue
|
||||
fi
|
||||
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
|
||||
touch -d "$status_date" "$main_basedir"/all_statuses/$instance/$i
|
||||
echo "$json" | jj -p "#[id=$i]" > "$main_basedir"/all_statuses/$instance/$i/$i.json
|
||||
|
|
Loading…
Reference in a new issue