diff options
author | 2021-10-10 12:39:25 +0200 | |
---|---|---|
committer | 2021-10-10 12:39:25 +0200 | |
commit | 367bdca25093ee76b36506d8a5e6733b0aa2e2bb (patch) | |
tree | 37b1b82ae6e9fad7e6d95b8abbb58bdb42049707 /internal/messages/messages.go | |
parent | Derive visibility fixes (#271) (diff) | |
download | gotosocial-367bdca25093ee76b36506d8a5e6733b0aa2e2bb.tar.xz |
Handle forwarded messages (#273)
* correct path of foss_satan
* add APIri and notes
* test create forward note
* rename target => receiving account
* split up create into separate funcs
* update extractFromCtx
* tidy up from federator processing
* foss satan => http not https
* check if status in db
* mock dereference of status from IRI
* add forward message deref test
* update test with activities
* add remote_account_2 to test rig
Diffstat (limited to 'internal/messages/messages.go')
-rw-r--r-- | internal/messages/messages.go | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/internal/messages/messages.go b/internal/messages/messages.go index 6cd2f466c..1a9396100 100644 --- a/internal/messages/messages.go +++ b/internal/messages/messages.go @@ -18,7 +18,11 @@ package messages -import "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" +import ( + "net/url" + + "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" +) // FromClientAPI wraps a message that travels from the client API into the processor. type FromClientAPI struct { @@ -31,8 +35,9 @@ type FromClientAPI struct { // FromFederator wraps a message that travels from the federator into the processor. type FromFederator struct { - APObjectType string - APActivityType string - GTSModel interface{} - ReceivingAccount *gtsmodel.Account + APObjectType string // what is the object type of this message? eg., Note, Profile etc. + APActivityType string // what is the activity type of this message? eg., Create, Follow etc. + APIri *url.URL // what is the IRI ID of this activity? + GTSModel interface{} // representation of this object if it's already been converted into our internal gts model + ReceivingAccount *gtsmodel.Account // which account owns the inbox that this activity was posted to? } |