aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2022-06-16 14:19:45 -0500
committerAnthony Wang2022-06-16 14:19:45 -0500
commit202303e8883e92a6e54ea0f55243185346504b93 (patch)
tree2f17fa78b02f93904291c6b2ec5dfb6ffef9fe2b
parentc67e4189de09519288693ade69825dbd5c32eb7f (diff)
parent7a214dd212c7835e424b9113bdcb33d984f0500b (diff)
Merge branch 'feature-activitypub' into feature-go-ap-inbox-outbox
-rw-r--r--custom/conf/app.example.ini2
-rw-r--r--modules/activitypub/client.go1
-rw-r--r--modules/activitypub/main_test.go5
3 files changed, 6 insertions, 2 deletions
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini
index 5b8d50537..4b258d569 100644
--- a/custom/conf/app.example.ini
+++ b/custom/conf/app.example.ini
@@ -2255,6 +2255,8 @@ PATH =
;; Maximum federation request and response size (MB)
; MAX_SIZE = 4
;;
+;; WARNING: Changing the settings below can break federation.
+;;
;; HTTP signature algorithms
; ALGORITHMS = rsa-sha256, rsa-sha512
;;
diff --git a/modules/activitypub/client.go b/modules/activitypub/client.go
index 8c2854f71..46b8c675b 100644
--- a/modules/activitypub/client.go
+++ b/modules/activitypub/client.go
@@ -28,6 +28,7 @@ const (
)
// Gets the current time as an RFC 2616 formatted string
+// RFC 2616 requires RFC 1123 dates but with GMT instead of UTC
func CurrentTime() string {
return strings.ReplaceAll(time.Now().UTC().Format(time.RFC1123), "UTC", "GMT")
}
diff --git a/modules/activitypub/main_test.go b/modules/activitypub/main_test.go
index 289bc9f32..7fa2b0926 100644
--- a/modules/activitypub/main_test.go
+++ b/modules/activitypub/main_test.go
@@ -12,6 +12,7 @@ import (
)
func TestMain(m *testing.M) {
- testOps := unittest.TestOptions{GiteaRootPath: filepath.Join("..", "..")}
- unittest.MainTest(m, &testOps)
+ unittest.MainTest(m, &unittest.TestOptions{
+ GiteaRootPath: filepath.Join("..", ".."),
+ })
}