mirror of
https://git.phreedom.club/localhost_frssoft/bbs-telnet
synced 2024-11-23 18:59:20 +02:00
notifs added
This commit is contained in:
parent
9df621aaf6
commit
2bfe5c5a4a
|
@ -49,6 +49,7 @@ while read -r cmd mesg; do
|
||||||
reply=$reply_id toot "$status" | jq '.id, .errors'
|
reply=$reply_id toot "$status" | jq '.id, .errors'
|
||||||
reply=''
|
reply=''
|
||||||
;;
|
;;
|
||||||
|
"notifs") notifications ;;
|
||||||
"home")
|
"home")
|
||||||
tlhome=$(timeline_home "$mesg")
|
tlhome=$(timeline_home "$mesg")
|
||||||
tlhome_len=$(echo "$tlhome" | wc -l)
|
tlhome_len=$(echo "$tlhome" | wc -l)
|
||||||
|
|
|
@ -12,8 +12,20 @@ timeline_render(){
|
||||||
end | @text'
|
end | @text'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
notifications_render(){
|
||||||
|
cat - | jq -r '.[] |
|
||||||
|
"[\(.type) \(.created_at) \(.account.acct)]",
|
||||||
|
if .status then
|
||||||
|
.status.id, .status.pleroma.content."text/plain"
|
||||||
|
else empty
|
||||||
|
end | @text'
|
||||||
|
}
|
||||||
|
|
||||||
timeline_home(){
|
timeline_home(){
|
||||||
curl -s -H "Authorization: Bearer $instance_token" "https://$instance/api/v1/timelines/home?limit=40&max_id=$1" | timeline_render
|
curl -s -H "Authorization: Bearer $instance_token" "https://$instance/api/v1/timelines/home?limit=40&max_id=$1" | timeline_render
|
||||||
}
|
}
|
||||||
|
|
||||||
|
notifications(){
|
||||||
|
curl -s -H "Authorization: Bearer $instance_token" "https://$instance/api/v1/notifications?limit=40&max_id=$1" | notifications_render
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue