diff options
author | FChannel <> | 2021-06-01 00:45:05 -0700 |
---|---|---|
committer | FChannel <> | 2021-06-01 00:45:05 -0700 |
commit | 60b6bdf1c021fcffff397c7b1439a1407ed90f0a (patch) | |
tree | b176b963f45777b1878e1d178877a4e033010418 | |
parent | b7ce42c8a9a6f458cc1537f6aeefe0b5f7ab150c (diff) |
changed actor to type Group and other clean up
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | main.go | 11 | ||||
-rw-r--r-- | static/js/posts.js | 2 | ||||
-rw-r--r-- | static/npost.html | 2 |
4 files changed, 5 insertions, 13 deletions
@@ -74,7 +74,8 @@ Any contributions or suggestions are appreciated. Best way to give immediate fee `emailpass:password` -#### local testing +### local testing + When testing on a local env when setting the `instance` value in the config file you have to append the port number to the local address eg. `instance:localhost:3000` with `instanceport` also being set to the same port. If you want to test federation between servers locally you have to use your local ip as the `instance` eg. `instance:192.168.0.2:3000` and `instance:192:168:0:3:3000` adding the port to localhost will not route correctly. @@ -740,12 +740,8 @@ func main() { } if !IsIDLocal(db, id) { - if(!isOP) { CloseLocalReportDB(db, id, board) CreateLocalDeleteDB(db, id, "post") - } else { - - } if(manage == "t") { http.Redirect(w, r, "/" + *Key + "/" + board, http.StatusSeeOther) } else if(OP != ""){ @@ -757,9 +753,6 @@ func main() { return } - - - if !isOP { DeleteReportActivity(db, id) DeleteObjectRequest(db, id) @@ -1145,7 +1138,7 @@ func CreateNewActor(board string, prefName string, summary string, authReq []str actor.Name = board } - actor.Type = "Service" + actor.Type = "Group" actor.Id = fmt.Sprintf("%s", path) actor.Following = fmt.Sprintf("%s/following", actor.Id) actor.Followers = fmt.Sprintf("%s/followers", actor.Id) @@ -2213,7 +2206,7 @@ func GetActorInstance(path string) (string, string) { } } - re = regexp.MustCompile(`(http:\\|https:\\)?(www)?([\w\d-_.:]+)\/([\w\d-_.]+)`) + re = regexp.MustCompile(`(https?:\\)?(www)?([\w\d-_.:]+)\/([\w\d-_.]+)`) httpFormat := re.MatchString(path) if(httpFormat) { diff --git a/static/js/posts.js b/static/js/posts.js index 8dd05eb..b2bfd7a 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -212,7 +212,7 @@ function report(actorName, id) var inReplyTo = document.getElementById("report-inReplyTo-box"); var w = window.innerWidth / 2 - 200; - var h = document.getElementById(id + "-content").offsetTop - 448; + var h = document.getElementById(id + "-content").offsetTop - 348; box.setAttribute("style", "display: block; position: absolute; width: 400px; height: 480px; z-index: 9; top: " + h + "px; left: " + w + "px; padding: 5px;"); diff --git a/static/npost.html b/static/npost.html index e3c4cec..b91b795 100644 --- a/static/npost.html +++ b/static/npost.html @@ -14,8 +14,6 @@ </ul> <hr> -{{ $board.Restricted }} - {{ template "posts" . }} <hr> |