From 7ada3bd2523f661f3589d68d360f75822e24bebe Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Tue, 25 Jul 2023 17:08:36 +0300 Subject: [PATCH] workaround for /n to \n --- mastodon_api.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mastodon_api.sh b/mastodon_api.sh index 8acba8a..bb93e07 100755 --- a/mastodon_api.sh +++ b/mastodon_api.sh @@ -1,7 +1,8 @@ #/bin/sh toot(){ - curl -s -X POST -F in_reply_to_id=$reply -F status="$1" -F visibility='unlisted' -H "Authorization: Bearer $instance_token" https://$instance/api/v1/statuses + message="$(echo "$1" | sed -e 's!/n!\n!g')" # Just my android keyboard too dumb and far + curl -s -X POST -F in_reply_to_id=$reply -F status="$message" -F visibility='unlisted' -H "Authorization: Bearer $instance_token" https://$instance/api/v1/statuses } timeline_render(){