Added reply to status

This commit is contained in:
localhost_frssoft 2022-08-06 13:11:42 +03:00
parent 6e8d823726
commit e91e401a4a
2 changed files with 9 additions and 1 deletions

View File

@ -36,6 +36,9 @@ touch favourite
touch share
```
### Ответ на пост
Чтобы ответить на пост нужно в папке с постом создать файл message и написать туда свой ответ, затем создать файл reply
### Чтение
Учитывая то, что каждый пост-статус это файл, то вы можете вывести все посты за раз например так:
```

View File

@ -996,7 +996,7 @@ if [ "$daemon_mode" = 'yes' ]; then
statuses_auto_update &
while true; do
sleep 5
for file_func in favourite share; do
for file_func in favourite share reply; do
statuses_file_action=$(/bin/ls $main_basedir/all_statuses/$instance/*/$file_func 2>/dev/null)
if [ -n "$statuses_file_action" ]; then
dir_status=$(dirname "$statuses_file_action")
@ -1009,6 +1009,11 @@ if [ "$daemon_mode" = 'yes' ]; then
case $file_func in
'favourite') favorite_api_status "$status_id" ; rm "$statuses_file_action" ;;
'share') share_api_status $status_id ; rm "$statuses_file_action" ;;
'reply')
replyto=$status_id
write_api_status $dir_status/message
rm "$statuses_file_action"
;;
esac
fi
done