Compare commits
2 Commits
b8ebeddfac
...
0a7a186d4f
Author | SHA1 | Date |
---|---|---|
Alex | 0a7a186d4f | |
Alex | 7c6e53eb57 |
|
@ -4,8 +4,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"maunium.net/go/mautrix"
|
"maunium.net/go/mautrix"
|
||||||
"maunium.net/go/mautrix/event"
|
|
||||||
"maunium.net/go/mautrix/format"
|
|
||||||
"maunium.net/go/mautrix/id"
|
"maunium.net/go/mautrix/id"
|
||||||
"roese.dev/matrix-development-lauge/modules/config"
|
"roese.dev/matrix-development-lauge/modules/config"
|
||||||
)
|
)
|
||||||
|
@ -30,7 +28,8 @@ func SendMessage(header string, content string, url string) {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := format.RenderMarkdown(fmt.Sprintf("Thema: Radko-Stöckl-Schule - Aktuelles <h4>%s</h4>%s<br>%s", header, content, url), false, true)
|
//msg := format.RenderMarkdown(fmt.Sprintf("Thema: Radko-Stöckl-Schule - Aktuelles <h4>%s</h4>%s<br>%s", header, content, url), false, true)
|
||||||
|
|
||||||
client.SendMessageEvent(id.RoomID(cfg.RoomId), event.EventMessage, &msg)
|
//client.SendMessageEvent(id.RoomID(cfg.RoomId), event.EventMessage, &msg)
|
||||||
|
client.SendNotice(id.RoomID(cfg.RoomId), fmt.Sprintf("Thema: Radko-Stöckl-Schule - Aktuelles <h4>%s</h4>%s<br>%s", header, content, url))
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,6 @@ func School() {
|
||||||
|
|
||||||
log.Println("header", latest_page_title, "text", text, "url", url)
|
log.Println("header", latest_page_title, "text", text, "url", url)
|
||||||
|
|
||||||
matrixbot.SendMessage(latest_page_title, text, url)
|
matrixbot.SendMessage(latest_page_title, text, "https://www.radko-stoeckl-schule.de"+url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue