Improved telegram message formatting

This commit is contained in:
Sayantan Santra 2022-10-12 18:07:42 -05:00
parent 22c9b6e6ed
commit e78e0b6112

View file

@ -169,12 +169,11 @@ echo "Sending messages to telegram" | tee -a build.log
# telegram-upload uses personal account, hence bypassing 50 MB max upload limit of bots # telegram-upload uses personal account, hence bypassing 50 MB max upload limit of bots
/home/sintan/.local/bin/telegram-upload ReVanced-nonroot-$timestamp.apk ReVanced-Music-nonroot-$timestamp.apk --to "placeholder_for_channel_address" --caption "" /home/sintan/.local/bin/telegram-upload ReVanced-nonroot-$timestamp.apk ReVanced-Music-nonroot-$timestamp.apk --to "placeholder_for_channel_address" --caption ""
echo "<----------Build details---------->" > message.tmp
cat versions.json | tail -n+2 | head -n-1 | cut -c3- | sed "s/\"//g" | sed "s/,//g" | sed "s/com.google.android.apps.youtube.music/YouTube Music/" | sed "s/com.google.android.youtube/YouTube/" | sed "s/vanced-microG/Vanced microG/" >> message.tmp
# telegram.sh uses bot account, but it supports formatted messages # telegram.sh uses bot account, but it supports formatted messages
cat message.tmp | ./telegram.sh - msg=$(cat versions.json | tail -n+2 | head -n-1 | cut -c3- | sed "s/\"//g" | sed "s/,//g" | sed "s/com.google.android.apps.youtube.music/YouTube Music/" \
rm message.tmp | sed "s/com.google.android.youtube/YouTube/" | sed "s/vanced-microG/Vanced microG/" | sed "s/revanced\///g" | awk 1 ORS=$'\n')
./telegram.sh -T "⚙⚙⚙ Build Details ⚙⚙⚙" -M "$msg"$'\n'"⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯"
# Do some cleanup # Do some cleanup
mkdir -p archive mkdir -p archive