aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorFChannel <=>2021-01-30 01:47:26 -0800
committerFChannel <=>2021-01-30 01:47:26 -0800
commitf0afe325423011a8cb4eed5192375fcae5312da3 (patch)
tree7baf99ca88d29de781c576ab55623650594bea2d /main.go
parent2fdaf020b1d952a9c86863c380affceb9ac09c61 (diff)
fix for pagnation
Diffstat (limited to 'main.go')
-rw-r--r--main.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/main.go b/main.go
index e4cf856..00884ef 100644
--- a/main.go
+++ b/main.go
@@ -94,6 +94,7 @@ func main() {
var actorFollowers bool
var actorReported bool
var actorVerification bool
+ var actorMainPage bool
var accept = r.Header.Get("Accept")
@@ -108,7 +109,7 @@ func main() {
mainFollowing = (path == "/following")
mainFollowers = (path == "/followers")
} else {
- actorMain = (path == "/" + actor.Name)
+ actorMain = (path == "/" + actor.Name)
actorInbox = (path == "/" + actor.Name + "/inbox")
actorCatalog = (path == "/" + actor.Name + "/catalog")
actorOutbox = (path == "/" + actor.Name + "/outbox")
@@ -116,9 +117,13 @@ func main() {
actorFollowers = (path == "/" + actor.Name + "/followers")
actorReported = (path == "/" + actor.Name + "/reported")
actorVerification = (path == "/" + actor.Name + "/verification")
+
+ re := regexp.MustCompile("/" + actor.Name + "/[0-9]{1,2}")
+
+ actorMainPage = re.MatchString(path)
- re := regexp.MustCompile("/" + actor.Name + "/\\w+")
- actorPost = re.MatchString(path)
+ re = regexp.MustCompile("/" + actor.Name + "/\\w+")
+ actorPost = re.MatchString(path)
}
if mainActor {
@@ -164,7 +169,7 @@ func main() {
return
}
- if actorMain {
+ if actorMain || actorMainPage {
if accept == activitystreams || accept == ldjson {
GetActorInfo(w, db, actor.Id)
return
@@ -810,7 +815,6 @@ func main() {
}
if !IsIDLocal(db, id) {
- fmt.Println("not local")
CreateLocalReportDB(db, id, board, reason)
http.Redirect(w, r, r.Header.Get("Referer"), http.StatusSeeOther)
return