aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-04-27 15:32:51 +0200
committerOmar Polo <op@omarpolo.com>2021-04-27 15:32:51 +0200
commit5ad39add1c84d1a1ad06c0e5d2289016cff8b55d (patch)
treef82233c4b935f2e0912ce5f352692002afd0a543
parent7cc052140ad38f130384d3feca5953e6a04ab8c5 (diff)
downloadgemitbot-5ad39add1c84d1a1ad06c0e5d2289016cff8b55d.tar.gz
gemitbot-5ad39add1c84d1a1ad06c0e5d2289016cff8b55d.tar.bz2
fix url
-rw-r--r--main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.go b/main.go
index ca8b9a0..15f232a 100644
--- a/main.go
+++ b/main.go
@@ -8,6 +8,7 @@ import (
"io/ioutil"
"log"
"net/http"
+ "path/filepath"
"regexp"
irc "github.com/fluffle/goirc/client"
@@ -50,7 +51,11 @@ func matrix2gemini(conn *irc.Conn, line *irc.Line) {
conn.Privmsg(
channel,
- fmt.Sprintf("better: %s/%s", *baseurl, tmpfile.Name()),
+ fmt.Sprintf(
+ "better: %s/%s",
+ *baseurl,
+ filepath.Base(tmpfile.Name()),
+ ),
)
}
}