summaryrefslogtreecommitdiff
path: root/internal/typeutils
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-05-29 19:39:43 +0200
committerLibravatar GitHub <noreply@github.com>2021-05-29 19:39:43 +0200
commit1fe5e36ac3a631a53724fe99583b7f11baa32c53 (patch)
tree40ae75c3613c9c6915273f98fe7ce41046d11381 /internal/typeutils
parentfederate account updates (diff)
downloadgotosocial-1fe5e36ac3a631a53724fe99583b7f11baa32c53.tar.xz
Search (#36)
First implementation of search functionality for remote account and status lookups.
Diffstat (limited to 'internal/typeutils')
-rw-r--r--internal/typeutils/converter.go2
-rw-r--r--internal/typeutils/internal.go8
-rw-r--r--internal/typeutils/internaltoas.go1
3 files changed, 6 insertions, 5 deletions
diff --git a/internal/typeutils/converter.go b/internal/typeutils/converter.go
index 9cd7ad9b4..ab680fbdd 100644
--- a/internal/typeutils/converter.go
+++ b/internal/typeutils/converter.go
@@ -145,7 +145,7 @@ type TypeConverter interface {
/*
WRAPPER CONVENIENCE FUNCTIONS
*/
-
+
// WrapPersonInUpdate
WrapPersonInUpdate(person vocab.ActivityStreamsPerson, originAccount *gtsmodel.Account) (vocab.ActivityStreamsUpdate, error)
}
diff --git a/internal/typeutils/internal.go b/internal/typeutils/internal.go
index 3110b382c..626509b34 100644
--- a/internal/typeutils/internal.go
+++ b/internal/typeutils/internal.go
@@ -40,10 +40,10 @@ func (c *converter) StatusToBoost(s *gtsmodel.Status, boostingAccount *gtsmodel.
URL: boostWrapperStatusURL,
// the boosted status is not created now, but the boost certainly is
- CreatedAt: time.Now(),
- UpdatedAt: time.Now(),
- Local: local,
- AccountID: boostingAccount.ID,
+ CreatedAt: time.Now(),
+ UpdatedAt: time.Now(),
+ Local: local,
+ AccountID: boostingAccount.ID,
// replies can be boosted, but boosts are never replies
InReplyToID: "",
diff --git a/internal/typeutils/internaltoas.go b/internal/typeutils/internaltoas.go
index cceb1b11b..296d0a182 100644
--- a/internal/typeutils/internaltoas.go
+++ b/internal/typeutils/internaltoas.go
@@ -252,6 +252,7 @@ func (c *converter) AccountToAS(a *gtsmodel.Account) (vocab.ActivityStreamsPerso
headerImage.SetActivityStreamsUrl(headerURLProperty)
headerProperty.AppendActivityStreamsImage(headerImage)
+ person.SetActivityStreamsImage(headerProperty)
}
return person, nil