diff --git a/ratatoskr.sh b/ratatoskr.sh index f94a728..21bbc7a 100755 --- a/ratatoskr.sh +++ b/ratatoskr.sh @@ -255,12 +255,12 @@ while : ; do fi # process the response to get the latest event id - latest_id="$(jq -r '.data[0].id' <<< "$result")" + latest_id="$(jq -r '.[].id' <<< "$result")" if [[ "${since_id}" != "${latest_id}" ]]; then # handle new events - events="$(jq -r '.data[] | "\(.account.username): \(.content)"' <<< "$result")" + events="$(jq -r '.[].content' <<< "$result")" echo -e "$events" | while read -r event; do - echo "$event" + echo "$event" | sed -e 's/<[^>]*>//g' echo done since_id="$latest_id"