Commit ad8b5ba3 authored by zauberstuhl's avatar zauberstuhl

Merge branch 'ap_improvements' into 'master'

AP add actor field to Note object

See merge request !20
parents 76129a9a 74bc2c2f
Pipeline #775 failed with stage
in 1 minute and 14 seconds
...@@ -28,7 +28,6 @@ import ( ...@@ -28,7 +28,6 @@ import (
type ActivityPubCreate struct { type ActivityPubCreate struct {
ActivityPubContext `json:",omitempty"` ActivityPubContext `json:",omitempty"`
// Id string `json:"id"`
Actor string `json:"actor"` Actor string `json:"actor"`
Published helpers.Time `json:"published"` Published helpers.Time `json:"published"`
To []string `json:"to"` To []string `json:"to"`
...@@ -38,7 +37,7 @@ type ActivityPubCreate struct { ...@@ -38,7 +37,7 @@ type ActivityPubCreate struct {
type ActivityPubNote struct { type ActivityPubNote struct {
ActivityPubBase `json:",omitempty"` ActivityPubBase `json:",omitempty"`
// Id string `json:"id"` Actor string `json:"actor,omitempty"`
Summary string `json:"summary"` Summary string `json:"summary"`
Content string `json:"content"` Content string `json:"content"`
InReplyTo string `json:"inReplyTo"` InReplyTo string `json:"inReplyTo"`
......
...@@ -51,6 +51,7 @@ func (e *ActivityPubCreateComment) SetAuthor(author string) { ...@@ -51,6 +51,7 @@ func (e *ActivityPubCreateComment) SetAuthor(author string) {
(*e).Object.Cc = (*e).Cc (*e).Object.Cc = (*e).Cc
} }
(*e).Actor = e.Actor + "/actor" (*e).Actor = e.Actor + "/actor"
(*e).Object.Actor = e.Actor
} }
func (e *ActivityPubCreateComment) Guid() string { func (e *ActivityPubCreateComment) Guid() string {
......
...@@ -50,6 +50,7 @@ func (e *ActivityPubCreatePost) SetAuthor(author string) { ...@@ -50,6 +50,7 @@ func (e *ActivityPubCreatePost) SetAuthor(author string) {
(*e).Object.Cc = (*e).Cc (*e).Object.Cc = (*e).Cc
} }
(*e).Actor = e.Actor + "/actor" (*e).Actor = e.Actor + "/actor"
(*e).Object.Actor = e.Actor
(*e).Object.AttributedTo = e.Actor (*e).Object.AttributedTo = e.Actor
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment