From 1d8f957248c084773b235919be17d238be36ae01 Mon Sep 17 00:00:00 2001
From: FChannel <>
Date: Sun, 3 Oct 2021 13:53:11 -0700
Subject: v0.0.15-dev
---
static/faq.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/static/faq.html b/static/faq.html
index f4fb237..06ae421 100644
--- a/static/faq.html
+++ b/static/faq.html
@@ -56,7 +56,7 @@
Soon™.
[Home][Rules][FAQ]
--
cgit v1.2.3
From 4802b91fe62eb28512b7f6c602d40f807bcbd33f Mon Sep 17 00:00:00 2001
From: FChannel <>
Date: Mon, 4 Oct 2021 19:27:54 -0700
Subject: fix for instance index with empty actor id
---
main.go | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/main.go b/main.go
index 68d8a4f..8deedd4 100644
--- a/main.go
+++ b/main.go
@@ -2778,27 +2778,31 @@ func AddInstanceToIndex(actor string) {
func AddInstanceToIndexDB(db *sql.DB, actor string) {
+ //sleep to be sure the webserver is fully initialized
+ //before making finger request
time.Sleep(15 * time.Second)
+ nActor := FingerActor(actor)
+
+ if nActor.Id == "" {
+ return
+ }
+
followers := GetCollectionFromID("https://fchan.xyz/followers")
var alreadyIndex = false
for _, e := range followers.Items {
- if e.Id == actor {
+ if e.Id == nActor.Id {
alreadyIndex = true
}
}
- checkActor := GetActor(actor)
-
- if checkActor.Id == actor {
- if !alreadyIndex {
- query := `insert into follower (id, follower) values ($1, $2)`
+ if !alreadyIndex {
+ query := `insert into follower (id, follower) values ($1, $2)`
- _, err := db.Exec(query, "https://fchan.xyz", actor)
+ _, err := db.Exec(query, "https://fchan.xyz", nActor.Id)
- CheckError(err, "Error with add to index query")
- }
+ CheckError(err, "Error with add to index query")
}
}
--
cgit v1.2.3
From 1df965ee5a13921f30a453cd81be6def8f19c2b3 Mon Sep 17 00:00:00 2001
From: FChannel <>
Date: Mon, 4 Oct 2021 19:47:46 -0700
Subject: fix for faking post IDs
---
outboxPost.go | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/outboxPost.go b/outboxPost.go
index cb48d3e..65b9929 100644
--- a/outboxPost.go
+++ b/outboxPost.go
@@ -537,14 +537,23 @@ func ParseInboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) {
switch activity.Type {
case "Create":
+
for _, e := range activity.To {
if IsActorLocal(db, e) {
if !IsActorLocal(db, activity.Actor.Id) {
+
+ col := GetCollectionFromID(activity.Object.Id)
+
+ if len(col.OrderedItems) < 1 {
+ break
+ }
+
WriteObjectToCache(db, *activity.Object)
ArchivePosts(db, GetActorFromDB(db, e))
}
}
}
+
break
case "Delete":
--
cgit v1.2.3
From 4e26c41df1c90ec5fe4a782d74a81f937b1015f2 Mon Sep 17 00:00:00 2001
From: FChannel <>
Date: Mon, 4 Oct 2021 20:07:55 -0700
Subject: fix for reply box offset off screen
---
static/bottom.html | 2 +-
static/js/posts.js | 8 ++------
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/static/bottom.html b/static/bottom.html
index 023deeb..ab8d88d 100644
--- a/static/bottom.html
+++ b/static/bottom.html
@@ -4,7 +4,7 @@