|
@@ -86,7 +86,10 @@ func main() {
|
|
|
fmt.Println(faction.name + ": " + strconv.Itoa(code))
|
|
fmt.Println(faction.name + ": " + strconv.Itoa(code))
|
|
|
if code == 204 {
|
|
if code == 204 {
|
|
|
// Assuming sent
|
|
// Assuming sent
|
|
|
- setBroadcastTrue(e.id)
|
|
|
|
|
|
|
+ err = setBroadcastTrue(e.id)
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ log.Fatal(err)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -212,6 +215,7 @@ func broadcastSingleAttack(attack Attack, faction Faction) error {
|
|
|
log.Println("Database error:", err)
|
|
log.Println("Database error:", err)
|
|
|
}
|
|
}
|
|
|
news := replaceLinks(attack.news)
|
|
news := replaceLinks(attack.news)
|
|
|
|
|
+ fmt.Println("Links replaced", news)
|
|
|
news = strings.Replace(news, "http:", "https:", -1)
|
|
news = strings.Replace(news, "http:", "https:", -1)
|
|
|
for _, val := range members {
|
|
for _, val := range members {
|
|
|
news = strings.Replace(news, val, "**"+val+"**", -1)
|
|
news = strings.Replace(news, val, "**"+val+"**", -1)
|