aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorFChannel <=>2021-01-24 10:59:49 -0800
committerFChannel <=>2021-01-24 10:59:49 -0800
commit895d90f8dd038540e65cf291f003195a0f6bd024 (patch)
treef8c9dcd4fc735cc1b9dc76866df8215c516abb8f /main.go
parent2ca021e2c6599b39e6225fdbd449093517a34418 (diff)
domain routing bug
Diffstat (limited to 'main.go')
-rw-r--r--main.go15
1 files changed, 11 insertions, 4 deletions
diff --git a/main.go b/main.go
index e4d1190..e9cdb2f 100644
--- a/main.go
+++ b/main.go
@@ -100,9 +100,9 @@ func main() {
var method = r.Method
- var actor = GetActorFromPath(db, path, "/")
+ var actor = GetActorFromPath(db, path, "/")
- if actor.Name == "" {
+ if actor.Name == "main" {
mainActor = (path == "/")
mainInbox = (path == "/inbox")
mainOutbox = (path == "/outbox")
@@ -429,7 +429,10 @@ func main() {
CheckError(err, "error with add board follow resp")
+
+ following := GetActorFollowingDB(db, Domain)
+ Boards = &following
http.Redirect(w, r, r.Header.Get("Referer"), http.StatusSeeOther)
@@ -916,8 +919,12 @@ func GetActorFromPath(db *sql.DB, location string, prefix string) Actor {
}
var nActor Actor
-
- nActor = GetActorByName(db, actor)
+
+ nActor = GetActorByNameFromDB(db, actor)
+
+ if nActor.Id == "" {
+ nActor = GetActorByName(db, actor)
+ }
return nActor
}