diff --git a/README.md b/README.md index 80f80d3..49d531d 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,5 @@ It can be used to post things you may want to send like playing music, or it can echo "Hello world" | ./ratatoskr -p It's still very much a work in progress, but have fun with it anyway. :) + +One thing not in help, if you want to display the client in your posts, add showClient="true" to your ~/.config/ratatoskr/default.conf file. diff --git a/ratatoskr.sh b/ratatoskr.sh index 5e40702..ec267db 100755 --- a/ratatoskr.sh +++ b/ratatoskr.sh @@ -128,6 +128,13 @@ post_status() { local statusText="$*" statusVisibility="${statusVisibility:-public}" statusContent_type="${statusContent_type:-text/markdown}" + if [[ "${showClient}" == "true" ]]; then + if [[ "${statusContent_type}" == "text/markdown" ]]; then + statusText+=$'\n'$'\n'"[Posted from Ratatoskr](https://git.stormux.org/storm/ratatoskr)" + else + statusText+=$'\n'$'\n'"Posted from Ratatoskr: https://git.stormux.org/storm/ratatoskr" + fi + fi local statusJson="$(jq -n --arg status "$statusText" \ --arg spoiler_text "$statusSpoiler_text" \ --arg visibility "$statusVisibility" \