fix: Unescape tweet text for webhook
This commit is contained in:
parent
8c400ac564
commit
d27348ca0b
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ package tweeter
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"html"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -80,7 +81,7 @@ func (app App) SendToWebhook(tweets []*ts.Tweet) {
|
||||||
tweetText = strings.ReplaceAll(tweetText, video.URL, "")
|
tweetText = strings.ReplaceAll(tweetText, video.URL, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
mainEmbed.SetText(strings.TrimSpace(tweetText))
|
mainEmbed.SetText(html.UnescapeString(strings.TrimSpace(tweetText)))
|
||||||
|
|
||||||
for _, data := range webhooksToSend {
|
for _, data := range webhooksToSend {
|
||||||
err := sendRequest(app.config.Webhook, data)
|
err := sendRequest(app.config.Webhook, data)
|
||||||
|
|
Loading…
Add table
Reference in a new issue