Almost working. csv last record is not written properly

This commit is contained in:
2022-05-02 00:36:27 -04:00
parent f5e4628459
commit 7a8e5029e8
5 changed files with 26 additions and 11 deletions

View File

@ -26,13 +26,14 @@ type telegramSender struct {
}
func (ts *telegramSender) SendLink(link string, channel string, rhash string) error {
msg := struct {
ChatID string `json:"chat_id"`
Text string `json:"text"`
ChatID string `json:"chat_id"`
Text string `json:"text"`
ParseMode string `json:"parse_mode"`
}{
ChatID: channel,
Text: fmt.Sprintf(`<a href="%s">➢</a> <a href="%s">Link</a>`, genIVLink(link, rhash), link),
ChatID: channel,
Text: fmt.Sprintf(`<a href="%s">➢</a> <a href="%s">Link</a>`, genIVLink(link, rhash), link),
ParseMode: "HTML",
}
data, err := json.Marshal(msg)