Remove matrix host from IRC link on web
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2023-07-21 12:07:54 +02:00
parent 6f574dcc4f
commit 9671a076bb
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -148,6 +148,11 @@ func main() {
ircLink = ircUrl.String()
humanHost := ircUrl.Host
splitChan := strings.Split(ircUrl.Fragment, "/")
if len(splitChan) > 1 {
ircLink = strings.ReplaceAll(ircLink, "/"+splitChan[1], "")
}
switch strings.Split(humanHost, ":")[0] {
case "irc.libera.chat":
if len(splitChan) > 1 {