aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorFChannel <=>2021-01-28 18:12:10 -0800
committerFChannel <=>2021-01-28 18:12:10 -0800
commit42e7acc965daea755a84064f68e4eebf3e3b2e11 (patch)
treed9c270771bcf0f9aac589d637435e920a14a519d /main.go
parente06b4e233382155808366538ed9075c3eeb351d2 (diff)
nil pointers .........
Diffstat (limited to 'main.go')
-rw-r--r--main.go17
1 files changed, 15 insertions, 2 deletions
diff --git a/main.go b/main.go
index 1085698..8afd834 100644
--- a/main.go
+++ b/main.go
@@ -563,7 +563,11 @@ func main() {
CheckError(err, "error with add board follow req")
- _, pass := GetPasswordFromSession(r)
+ _, pass := GetPasswordFromSession(r)
+
+ pass = CreateTripCode(pass)
+ pass = CreateTripCode(pass)
+
req.Header.Set("Authorization", "Basic " + pass)
req.Header.Set("Content-Type", activitystreams)
@@ -694,6 +698,7 @@ func main() {
var obj ObjectBase
obj.Id = id
+ obj.Actor = &actor
count, _ := GetObjectRepliesDBCount(db, obj)
@@ -1735,11 +1740,16 @@ func GetUniqueFilename(_type string) string {
func DeleteObjectRequest(db *sql.DB, id string) {
var nObj ObjectBase
+ var nActor Actor
nObj.Id = id
+ nObj.Actor = &nActor
activity := CreateActivity("Delete", nObj)
obj := GetObjectFromPath(db, id)
+
+ activity.Actor.Id = obj.Actor.Id
+
followers := GetActorFollowDB(db, obj.Actor.Id)
for _, e := range followers {
activity.To = append(activity.To, e.Id)
@@ -1748,19 +1758,22 @@ func DeleteObjectRequest(db *sql.DB, id string) {
following := GetActorFollowingDB(db, obj.Actor.Id)
for _, e := range following {
activity.To = append(activity.To, e.Id)
- }
+ }
MakeActivityRequest(db, activity)
}
func DeleteObjectAndRepliesRequest(db *sql.DB, id string) {
var nObj ObjectBase
+ var nActor Actor
nObj.Id = id
+ nObj.Actor = &nActor
activity := CreateActivity("Delete", nObj)
obj := GetObjectFromPath(db, id)
+ nObj.Actor = obj.Actor
followers := GetActorFollowDB(db, obj.Actor.Id)
for _, e := range followers {
activity.To = append(activity.To, e.Id)