aboutsummaryrefslogtreecommitdiff
path: root/activityPubStruct.go
diff options
context:
space:
mode:
Diffstat (limited to 'activityPubStruct.go')
-rw-r--r--activityPubStruct.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/activityPubStruct.go b/activityPubStruct.go
index 459259a..2c57c61 100644
--- a/activityPubStruct.go
+++ b/activityPubStruct.go
@@ -1,6 +1,8 @@
package main
import (
+ "time"
+
"encoding/json"
"html/template"
)
@@ -19,7 +21,7 @@ type ActivityRaw struct {
ToRaw json.RawMessage `json:"to,omitempty"`
BtoRaw json.RawMessage `json:"bto,omitempty"`
CcRaw json.RawMessage `json:"cc,omitempty"`
- Published string `json:"published,omitempty"`
+ Published time.Time `json:"published,omitempty"`
ActorRaw json.RawMessage `json:"actor,omitempty"`
ObjectRaw json.RawMessage `json:"object,omitempty"`
}
@@ -100,7 +102,7 @@ type Activity struct {
To []string `json:"to, omitempty"`
Bto []string `json:"bto,omitempty"`
Cc []string `json:"cc, omitempty"`
- Published string `json:"published,omitempty"`
+ Published time.Time `json:"published,omitempty"`
Object *ObjectBase `json:"object, omitempty"`
}
@@ -123,8 +125,8 @@ type ObjectBase struct {
InReplyTo []ObjectBase `json:"inReplyTo,omitempty"`
Location string `json:"location,omitempty"`
Preview *NestedObjectBase `json:"preview,omitempty"`
- Published string `json:"published,omitempty"`
- Updated string `json:"updated,omitempty"`
+ Published time.Time `json:"published,omitempty"`
+ Updated time.Time `json:"updated,omitempty"`
Object *NestedObjectBase `json:"object,omitempty"`
Attachment []ObjectBase `json:"attachment,omitempty"`
Replies *CollectionBase `json:"replies,omitempty"`
@@ -169,13 +171,13 @@ type NestedObjectBase struct {
InReplyTo []ObjectBase `json:"inReplyTo,omitempty"`
Location string `json:"location,omitempty"`
Preview ObjectBase `json:"preview,omitempty"`
- Published string `json:"published,omitempty"`
+ Published time.Time `json:"published,omitempty"`
Attachment []ObjectBase `json:"attachment,omitempty"`
Replies *CollectionBase `json:"replies,omitempty"`
StartTime string `json:"startTime,omitempty"`
Summary string `json:"summary,omitempty"`
Tag []ObjectBase `json:"tag,omitempty"`
- Updated string `json:"updated,omitempty"`
+ Updated time.Time `json:"updated,omitempty"`
Deleted string `json:"deleted,omitempty"`
Url []ObjectBase `json:"url,omitempty"`
Href string `json:"href,omitempty"`