aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--main.go11
-rw-r--r--static/js/posts.js2
-rw-r--r--static/npost.html2
4 files changed, 5 insertions, 13 deletions
diff --git a/README.md b/README.md
index 8da0dd6..44d3c3a 100644
--- a/README.md
+++ b/README.md
@@ -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.
diff --git a/main.go b/main.go
index 1942135..1be79e1 100644
--- a/main.go
+++ b/main.go
@@ -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>