fix: Unescape tweet text for webhook

This commit is contained in:
Manuel 2025-03-20 07:30:00 +01:00
parent 8c400ac564
commit d27348ca0b
Signed by: Manuel
GPG key ID: 4085037435E1F07A

View file

@ -3,6 +3,7 @@ package tweeter
import (
"bytes"
"encoding/json"
"html"
"log"
"net/http"
"strings"
@ -80,7 +81,7 @@ func (app App) SendToWebhook(tweets []*ts.Tweet) {
tweetText = strings.ReplaceAll(tweetText, video.URL, "")
}
mainEmbed.SetText(strings.TrimSpace(tweetText))
mainEmbed.SetText(html.UnescapeString(strings.TrimSpace(tweetText)))
for _, data := range webhooksToSend {
err := sendRequest(app.config.Webhook, data)