diff options
author | FChannel <=> | 2021-01-24 10:59:49 -0800 |
---|---|---|
committer | FChannel <=> | 2021-01-24 10:59:49 -0800 |
commit | 895d90f8dd038540e65cf291f003195a0f6bd024 (patch) | |
tree | f8c9dcd4fc735cc1b9dc76866df8215c516abb8f /main.go | |
parent | 2ca021e2c6599b39e6225fdbd449093517a34418 (diff) |
domain routing bug
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -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 } |